diff options
author | Starfall <us@starfall.systems> | 2020-12-07 09:35:37 -0600 |
---|---|---|
committer | Starfall <us@starfall.systems> | 2020-12-07 09:35:37 -0600 |
commit | 0f6d41052652c4fee87a19900795c8588d9a2174 (patch) | |
tree | a9440e6aa871459b4892eddcf5a72ae8d53990ba /app/models | |
parent | d085d49922b2ae32201caf5751344f5d88ccae4b (diff) | |
parent | 25f725d67a6d2542cd586ab7c56baca572eb4f88 (diff) |
Merge branch 'glitch' into main
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/concerns/account_merging.rb | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/app/models/concerns/account_merging.rb b/app/models/concerns/account_merging.rb index 691d02e03..c3b7018f2 100644 --- a/app/models/concerns/account_merging.rb +++ b/app/models/concerns/account_merging.rb @@ -15,7 +15,7 @@ module AccountMerging Status, StatusPin, MediaAttachment, Poll, Report, Tombstone, Favourite, Follow, FollowRequest, Block, Mute, AccountIdentityProof, AccountModerationNote, AccountPin, AccountStat, ListAccount, - PollVote, Mention + PollVote, Mention, AccountDeletionRequest, AccountNote ] owned_classes.each do |klass| @@ -28,7 +28,10 @@ module AccountMerging end end - target_classes = [Follow, FollowRequest, Block, Mute, AccountModerationNote, AccountPin] + target_classes = [ + Follow, FollowRequest, Block, Mute, AccountModerationNote, AccountPin, + AccountNote + ] target_classes.each do |klass| klass.where(target_account_id: other_account.id).find_each do |record| @@ -39,5 +42,10 @@ module AccountMerging end end end + + # Some follow relationships have moved, so the cache is stale + Rails.cache.delete_matched("followers_hash:#{id}:*") + Rails.cache.delete_matched("relationships:#{id}:*") + Rails.cache.delete_matched("relationships:*:#{id}") end end |