]> git.mxchange.org Git - friendica.git/blobdiff - src/Protocol/Diaspora.php
Merge pull request #9242 from nupplaphil/bug/9142-message-id
[friendica.git] / src / Protocol / Diaspora.php
index 050a83937359ac20bcefb0f263fe2b50e7f8c702..6e6ea03fb2ba5bed4495145d155dc8af794a759f 100644 (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);