Fix follower synchronization mechanism erroneously removing followers from multi-page collections (#34272)

This commit is contained in:
Claire 2025-03-25 16:50:05 +01:00 committed by GitHub
parent 81b88095b4
commit 3edac14f02
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 36 additions and 8 deletions

View file

@ -57,6 +57,9 @@ class ActivityPub::SynchronizeFollowersService < BaseService
collection = fetch_collection(collection['first']) if collection['first'].present?
return unless collection.is_a?(Hash)
# Abort if we'd have to paginate through more than one page of followers
return if collection['next'].present?
case collection['type']
when 'Collection', 'CollectionPage'
as_array(collection['items'])