mirror of
https://github.com/mastodon/mastodon.git
synced 2025-01-19 04:36:35 +00:00
Fix the local group's followers collection
This commit is contained in:
parent
3ef94c0044
commit
74e55c6ec6
|
@ -72,16 +72,16 @@ class ActivityPub::TagManager
|
|||
account_ids = status.active_mentions.pluck(:account_id)
|
||||
to = status.account.followers.where(id: account_ids).each_with_object([]) do |account, result|
|
||||
result << uri_for(account)
|
||||
result << account.followers_url if account.group?
|
||||
result << account_followers_url(account) if account.group?
|
||||
end
|
||||
to.concat(FollowRequest.where(target_account_id: status.account_id, account_id: account_ids).each_with_object([]) do |request, result|
|
||||
result << uri_for(request.account)
|
||||
result << request.account.followers_url if request.account.group?
|
||||
result << account_followers_url(request.account) if request.account.group?
|
||||
end)
|
||||
else
|
||||
status.active_mentions.each_with_object([]) do |mention, result|
|
||||
result << uri_for(mention.account)
|
||||
result << mention.account.followers_url if mention.account.group?
|
||||
result << account_followers_url(mention.account) if mention.account.group?
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -110,16 +110,16 @@ class ActivityPub::TagManager
|
|||
account_ids = status.active_mentions.pluck(:account_id)
|
||||
cc.concat(status.account.followers.where(id: account_ids).each_with_object([]) do |account, result|
|
||||
result << uri_for(account)
|
||||
result << account.followers_url if account.group?
|
||||
result << account_followers_url(account) if account.group?
|
||||
end)
|
||||
cc.concat(FollowRequest.where(target_account_id: status.account_id, account_id: account_ids).each_with_object([]) do |request, result|
|
||||
result << uri_for(request.account)
|
||||
result << request.account.followers_url if request.account.group?
|
||||
result << account_followers_url(request.account) if request.account.group?
|
||||
end)
|
||||
else
|
||||
cc.concat(status.active_mentions.each_with_object([]) do |mention, result|
|
||||
result << uri_for(mention.account)
|
||||
result << mention.account.followers_url if mention.account.group?
|
||||
result << account_followers_url(mention.account) if mention.account.group?
|
||||
end)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue