about summary refs log tree commit diff
path: root/app/models
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2020-12-05 17:33:29 +0100
committerClaire <claire.github-309c@sitedethib.com>2020-12-05 17:33:37 +0100
commitf8d867bac43e7e18d293ac32a9be597d1f46dce3 (patch)
treeb3d950a01a8dee5403081f56cf0c6b0571954e90 /app/models
parent13df125b6c75923ccc21a5c57053e680cea75f38 (diff)
parent44d5c6bc8ffd92cd201380dabe35748e50b6af68 (diff)
Merge branch 'master' into glitch-soc/merge-upstream
Conflicts:
- `app/services/remove_status_service.rb`:
  Conflict caused by us having a distinc Direct timeline.
  Ported upstream changes.
- `app/javascript/mastodon/features/compose/components/compose_form.js`:
  Conflict between glitch-soc's variable character limit and upstream
  refactoring that part of the code.
  Ported upstream changes.
Diffstat (limited to 'app/models')
-rw-r--r--app/models/concerns/account_merging.rb12
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