X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModel%2FConversation.php;h=1dcb6b0c2d7cc8476d1a0038eb613579d092a487;hb=33eda87bc45fe2b7cd9c001bd76cb0821bd9303e;hp=2ef58636a0c8f0c51eab0a13a8881d42603dcd40;hpb=b543ee8ac78168328c7a7f2d725ee01bb333e941;p=friendica.git diff --git a/src/Model/Conversation.php b/src/Model/Conversation.php index 2ef58636a0..1dcb6b0c2d 100644 --- a/src/Model/Conversation.php +++ b/src/Model/Conversation.php @@ -1,6 +1,22 @@ . + * */ namespace Friendica\Model; @@ -25,13 +41,26 @@ class Conversation const PARCEL_TWITTER = 67; const PARCEL_UNKNOWN = 255; + /** + * Unknown message direction + */ + const UNKNOWN = 0; + /** + * The message had been pushed to this sytem + */ + const PUSH = 1; + /** + * The message had been fetched by our system + */ + const PULL = 2; + public static function getByItemUri($item_uri) { return DBA::selectFirst('conversation', [], ['item-uri' => $item_uri]); } /** - * @brief Store the conversation data + * Store the conversation data * * @param array $arr Item array with conversation data * @return array Item array with removed conversation data @@ -63,6 +92,10 @@ class Conversation $conversation['protocol'] = $arr['protocol']; } + if (isset($arr['direction'])) { + $conversation['direction'] = $arr['direction']; + } + if (isset($arr['source'])) { $conversation['source'] = $arr['source']; } @@ -102,6 +135,7 @@ class Conversation unset($arr['conversation-href']); unset($arr['protocol']); unset($arr['source']); + unset($arr['direction']); return $arr; }