We now set the "global" direction

This commit is contained in:
Michael 2020-09-14 17:48:57 +00:00
parent cade34cd2d
commit 08fa5f0c19
5 changed files with 18 additions and 41 deletions

View file

@ -1736,7 +1736,7 @@ class Diaspora
$datarray["owner-id"] = Contact::getIdForURL($contact["url"], 0);
// Will be overwritten for sharing accounts in Item::insert
$datarray['post-type'] = Item::PT_COMMENT;
$datarray['post-type'] = ($datarray["uid"] == 0) ? Item::PT_GLOBAL : Item::PT_COMMENT;
$datarray["guid"] = $guid;
$datarray["uri"] = self::getUriFromGuid($author, $guid);
@ -2865,6 +2865,10 @@ class Diaspora
$datarray["protocol"] = Conversation::PARCEL_DIASPORA;
$datarray["source"] = $xml;
if ($datarray["uid"] == 0) {
$datarray["post-type"] = Item::PT_GLOBAL;
}
$datarray["body"] = self::replacePeopleGuid($body, $contact["url"]);
self::storeMentions($datarray['uri-id'], $text);