Refactor local-URI-to-account resolving (#34349)

This commit is contained in:
Claire 2025-04-02 16:44:09 +02:00 committed by GitHub
parent 4bbe33e0bd
commit dd23ba9c83
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 50 additions and 16 deletions

View file

@ -30,10 +30,7 @@ class ActivityPub::SynchronizeFollowersService < BaseService
# Account record, and should we not do that, we should have sent a Delete.
# In any case there is not much we can do if that occurs.
# TODO: this will need changes when switching to numeric IDs
usernames = items.filter_map { |uri| ActivityPub::TagManager.instance.uri_to_local_id(uri, :username)&.downcase }
Account.local.with_username(usernames)
ActivityPub::TagManager.instance.uris_to_local_accounts(items)
end
def remove_unexpected_local_followers!