about summary refs log tree commit diff
path: root/app/services
diff options
context:
space:
mode:
authorFire Demon <firedemon@creature.cafe>2020-09-01 19:39:52 -0500
committerStarfall <us@starfall.systems>2020-09-01 23:21:55 -0500
commita43c1d3f56c128c992f34b8e2b968de14e02ac48 (patch)
tree27f8ebe4134b00ed0904dd5434cd82a710244e1e /app/services
parente132da51a62f1a30f3998496ed2dee0b6762a51a (diff)
from monsterfork: [Privacy] Purge and re-download remote accounts if their actor key suddenly changes
Diffstat (limited to 'app/services')
-rw-r--r--app/services/activitypub/process_account_service.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/app/services/activitypub/process_account_service.rb b/app/services/activitypub/process_account_service.rb
index 85b915ec6..23234c1ae 100644
--- a/app/services/activitypub/process_account_service.rb
+++ b/app/services/activitypub/process_account_service.rb
@@ -35,12 +35,13 @@ class ActivityPub::ProcessAccountService < BaseService
     return if @account.nil?
 
     after_protocol_change! if protocol_changed?
-    after_key_change! if key_changed? && !@options[:signed_with_known_key]
     clear_tombstones! if key_changed?
+    return after_key_change! if key_changed? && !@options[:signed_with_known_key]
 
     unless @options[:only_key]
       check_featured_collection! if @account.featured_collection_url.present?
       check_links! unless @account.fields.empty?
+      process_sync
     end
 
     @account
@@ -104,7 +105,8 @@ class ActivityPub::ProcessAccountService < BaseService
   end
 
   def after_key_change!
-    RefollowWorker.perform_async(@account.id)
+    ResetAccountWorker.perform_async(@account.id)
+    nil
   end
 
   def check_featured_collection!