From 351e356bb496a120e39d83510962efdb35d6fd6f Mon Sep 17 00:00:00 2001 From: Diogo Cordeiro Date: Wed, 11 Dec 2019 00:15:27 +0000 Subject: [PATCH] [ActivityPub][Postman] Fix not sending notices to self --- plugins/ActivityPub/lib/postman.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/ActivityPub/lib/postman.php b/plugins/ActivityPub/lib/postman.php index 1cb79ccf57..2a02230bef 100644 --- a/plugins/ActivityPub/lib/postman.php +++ b/plugins/ActivityPub/lib/postman.php @@ -416,9 +416,10 @@ class Activitypub_postman /** * Clean list of inboxes to deliver messages * - * @author Diogo Cordeiro * @param bool $actorFollowers whether to include the actor's follower collection * @return array To Inbox URLs + * @throws Exception + * @author Diogo Cordeiro */ private function to_inbox(bool $actorFollowers = true): array { @@ -439,7 +440,7 @@ class Activitypub_postman foreach ($this->to as $to_profile) { $i = $to_profile->get_inbox(); // Prevent delivering to self - if ($i == [common_local_url('apInbox')]) { + if ($i == common_local_url('apInbox')) { continue; } $to_inboxes[] = $i;