From 8fc84eb85a452cfc9e1600b0fff735aa98fd781b Mon Sep 17 00:00:00 2001 From: Claire Date: Mon, 24 Mar 2025 14:34:15 +0100 Subject: [PATCH] Investigate ghost losing followers --- app/services/activitypub/synchronize_followers_service.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/services/activitypub/synchronize_followers_service.rb b/app/services/activitypub/synchronize_followers_service.rb index 5b58a025cb..d23a4c30f1 100644 --- a/app/services/activitypub/synchronize_followers_service.rb +++ b/app/services/activitypub/synchronize_followers_service.rb @@ -9,6 +9,7 @@ class ActivityPub::SynchronizeFollowersService < BaseService def call(account, partial_collection_url) @account = account @expected_followers_ids = [] + @partial_collection_url = partial_collection_url return unless process_collection!(partial_collection_url) @@ -38,6 +39,7 @@ class ActivityPub::SynchronizeFollowersService < BaseService def remove_unexpected_local_followers! @account.followers.local.where.not(id: @expected_followers_ids).reorder(nil).find_each do |unexpected_follower| + Rails.logger.warn "ActivityPub::SynchronizeFollowersService: Removing follower #{unexpected_follower.acct} for #{@account.acct} based on #{@partial_collection_url}" if @account.domain == 'activitypub.ghost.org' UnfollowService.new.call(unexpected_follower, @account) end end