- const PROTOCOL_UNKNOWN = 0;
- const PROTOCOL_DFRN = 1;
- const PROTOCOL_DIASPORA = 2;
- const PROTOCOL_OSTATUS_SALMON = 3;
- const PROTOCOL_OSTATUS_FEED = 4; // Deprecated
- const PROTOCOL_GS_CONVERSATION = 5; // Deprecated
- const PROTOCOL_SPLITTED_CONV = 6;
+ /*
+ * These constants represent the parcel format used to transport a conversation independently of the message protocol.
+ * It currently is stored in the "protocol" field for legacy reasons.
+ */
+ const PARCEL_ACTIVITYPUB = 0;
+ const PARCEL_DFRN = 1;
+ const PARCEL_DIASPORA = 2;
+ const PARCEL_SALMON = 3;
+ const PARCEL_FEED = 4; // Deprecated
+ const PARCEL_SPLIT_CONVERSATION = 6;
+ const PARCEL_TWITTER = 67;
+ const PARCEL_UNKNOWN = 255;
+
+ public static function getByItemUri($item_uri)
+ {
+ return DBA::selectFirst('conversation', [], ['item-uri' => $item_uri]);
+ }