th: activitypub: tag manager: ensure that a quote post has the OP included in to field

lolsob-rspec
Ariadne Conill 2022-12-28 06:48:24 +00:00
parent da8a7be248
commit 8c191b46e3
1 changed files with 6 additions and 2 deletions

View File

@ -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