X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FProtocol%2FOStatus.php;h=d6a2f2dad1ce3b8cb8bb180087ba2a377afa3c7f;hb=5cf71baf551bf209e62cf13b16173bddcd76a0fc;hp=ff8fc3cbea9af9cd5294583e8eba98a42a0c39be;hpb=a7fd9e3223ce95dc508c40353b4019b886f42902;p=friendica.git diff --git a/src/Protocol/OStatus.php b/src/Protocol/OStatus.php index ff8fc3cbea..d6a2f2dad1 100644 --- a/src/Protocol/OStatus.php +++ b/src/Protocol/OStatus.php @@ -385,12 +385,14 @@ class OStatus } } - $header = []; - $header['uid'] = $importer['uid']; - $header['network'] = Protocol::OSTATUS; - $header['wall'] = 0; - $header['origin'] = 0; - $header['gravity'] = Item::GRAVITY_COMMENT; + // Initial header elements + $header = [ + 'uid' => $importer['uid'], + 'network' => Protocol::OSTATUS, + 'wall' => 0, + 'origin' => 0, + 'gravity' => Item::GRAVITY_COMMENT, + ]; if (!is_object($doc->firstChild) || empty($doc->firstChild->tagName)) { return false; @@ -1468,6 +1470,8 @@ class OStatus $entry = $doc->createElement('entry'); if ($owner['contact-type'] == Contact::TYPE_COMMUNITY) { + $entry->setAttribute('xmlns:activity', ActivityNamespace::ACTIVITY); + $contact = Contact::getByURL($item['author-link']) ?: $owner; $contact['nickname'] = $contact['nickname'] ?? $contact['nick']; $author = self::addAuthor($doc, $contact, false);