about summary refs log tree commit diff
path: root/app/controllers
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2017-09-03 01:11:23 +0200
committerGitHub <noreply@github.com>2017-09-03 01:11:23 +0200
commita187dcefa1e0604e55eaff97a3c6403157528cdf (patch)
tree0430607dc59edfb7bb96273fe0bff3d00e86529d /app/controllers
parent5d170587e3b6c1a3b3ebe0910b62a4c526e2900d (diff)
Instantly upgrade account to ActivityPub if we receive ActivityPub payload (#4766)
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/activitypub/inboxes_controller.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/app/controllers/activitypub/inboxes_controller.rb b/app/controllers/activitypub/inboxes_controller.rb
index 5fce505fd..b37910b36 100644
--- a/app/controllers/activitypub/inboxes_controller.rb
+++ b/app/controllers/activitypub/inboxes_controller.rb
@@ -26,8 +26,12 @@ class ActivityPub::InboxesController < Api::BaseController
   end
 
   def upgrade_account
-    return unless signed_request_account.subscribed?
-    Pubsubhubbub::UnsubscribeWorker.perform_async(signed_request_account.id)
+    if signed_request_account.ostatus?
+      signed_request_account.update(last_webfingered_at: nil)
+      ResolveRemoteAccountWorker.perform_async(signed_request_account.acct)
+    end
+
+    Pubsubhubbub::UnsubscribeWorker.perform_async(signed_request_account.id) if signed_request_account.subscribed?
   end
 
   def process_payload