]> git.mxchange.org Git - friendica.git/blobdiff - src/Protocol/Diaspora.php
Private forums are now working via ActivityPub
[friendica.git] / src / Protocol / Diaspora.php
index d276814f5d3e21a17055d14bfd8198c5be77ec58..aba79364f406ab41eccaffd256c77ea436f4c39a 100644 (file)
@@ -859,7 +859,7 @@ class Diaspora
                        // Yes, then it is fine.
                        return true;
                        // Is it a post to a community?
-               } elseif (($contact["rel"] == Contact::FOLLOWER) && in_array($importer["page-flags"], [User::PAGE_FLAGS_COMMUNITY, User::PAGE_FLAGS_PRVGROUP])) {
+               } elseif (($contact["rel"] == Contact::FOLLOWER) && ($importer['account-type'] == User::ACCOUNT_TYPE_COMMUNITY)) {
                        // That's good
                        return true;
                        // Is the message a global user or a comment?
@@ -2712,6 +2712,9 @@ class Diaspora
 
                        $datarray["object-type"] = Activity\ObjectType::IMAGE;
                        $datarray["post-type"] = Item::PT_IMAGE;
+               } elseif ($data->poll) {
+                       $datarray["object-type"] = Activity\ObjectType::NOTE;
+                       $datarray["post-type"] = Item::PT_POLL;
                } else {
                        $datarray["object-type"] = Activity\ObjectType::NOTE;
                        $datarray["post-type"] = Item::PT_NOTE;