Store the push/pull direction in the conversation table

This commit is contained in:
Michael 2020-03-03 08:01:04 +00:00
parent 6f0d40c6c0
commit af6db65961
5 changed files with 27 additions and 11 deletions

View file

@ -41,6 +41,19 @@ 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]);
@ -79,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'];
}