1
0
Fork 0
forked from gitea/nas

Fix not send limited visibilities

This commit is contained in:
KMY 2023-08-12 20:31:18 +09:00
parent fc35348dfa
commit f6284c190b

View file

@ -100,7 +100,7 @@ class ActivityPub::TagManager
[account_followers_url(status.account)] [account_followers_url(status.account)]
when 'login' when 'login'
[account_followers_url(status.account), 'as:LoginOnly', 'LoginUser'] [account_followers_url(status.account), 'as:LoginOnly', 'LoginUser']
when 'direct', 'limited' when 'direct'
if status.account.silenced? if status.account.silenced?
# Only notify followers if the account is locally silenced # Only notify followers if the account is locally silenced
account_ids = status.active_mentions.pluck(:account_id) account_ids = status.active_mentions.pluck(:account_id)
@ -118,6 +118,11 @@ class ActivityPub::TagManager
result << followers_uri_for(mention.account) if mention.account.group? result << followers_uri_for(mention.account) if mention.account.group?
end.compact end.compact
end end
when 'limited'
status.mentions.each_with_object([]) do |mention, result|
result << uri_for(mention.account)
result << followers_uri_for(mention.account) if mention.account.group?
end.compact
end end
end end