From 9c51dc8dd535c08f7f0a8da1bfe8db62fa24248d Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Wed, 28 Dec 2022 06:48:24 +0000 Subject: [PATCH] activitypub: tag manager: ensure that a quote post has the OP included in to field --- app/lib/activitypub/tag_manager.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/lib/activitypub/tag_manager.rb b/app/lib/activitypub/tag_manager.rb index 3d6b28ef58..a8e29d2043 100644 --- a/app/lib/activitypub/tag_manager.rb +++ b/app/lib/activitypub/tag_manager.rb @@ -77,11 +77,15 @@ class ActivityPub::TagManager # Unlisted and private statuses go out primarily to the followers collection # Others go out only to the people they mention def to(status) + to = [] + + to << uri_for(status.quote.account) if status.quote? + case status.visibility when 'public' - [COLLECTIONS[:public]] + to << COLLECTIONS[:public] when 'unlisted', 'private' - [account_followers_url(status.account)] + to << account_followers_url(status.account) when 'direct', 'limited' if status.account.silenced? # Only notify followers if the account is locally silenced