Merge remote-tracking branch 'parent/main' into upstream-20250403
This commit is contained in:
commit
32f5604499
265 changed files with 6227 additions and 3383 deletions
|
@ -130,12 +130,7 @@ class ActivityPub::Activity
|
|||
|
||||
def first_mentioned_local_account
|
||||
audience = (as_array(@json['to']) + as_array(@json['cc'])).map { |x| value_or_id(x) }.uniq
|
||||
local_usernames = audience.select { |uri| ActivityPub::TagManager.instance.local_uri?(uri) }
|
||||
.map { |uri| ActivityPub::TagManager.instance.uri_to_local_id(uri, :username) }
|
||||
|
||||
return if local_usernames.empty?
|
||||
|
||||
Account.local.where(username: local_usernames).first
|
||||
ActivityPub::TagManager.instance.uris_to_local_accounts(audience).first
|
||||
end
|
||||
|
||||
def first_local_follower
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue