0
0
Fork 0

Fix blocking someone not clearing up list feeds (#16205)

This commit is contained in:
Claire 2021-05-10 17:31:55 +02:00 committed by GitHub
parent 10cd2d1e86
commit afb7882189
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 62 additions and 5 deletions

View file

@ -6,6 +6,7 @@ class AfterBlockService < BaseService
@target_account = target_account
clear_home_feed!
clear_list_feeds!
clear_notifications!
clear_conversations!
end
@ -16,6 +17,10 @@ class AfterBlockService < BaseService
FeedManager.instance.clear_from_home(@account, @target_account)
end
def clear_list_feeds!
FeedManager.instance.clear_from_lists(@account, @target_account)
end
def clear_conversations!
AccountConversation.where(account: @account).where('? = ANY(participant_account_ids)', @target_account.id).in_batches.destroy_all
end