Skip to content
Snippets Groups Projects
Commit a187dcef authored by Eugen Rochko's avatar Eugen Rochko Committed by GitHub
Browse files

Instantly upgrade account to ActivityPub if we receive ActivityPub payload (#4766)

parent 5d170587
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
# frozen_string_literal: true
class ResolveRemoteAccountWorker
include Sidekiq::Worker
sidekiq_options queue: 'pull', unique: :until_executed
def perform(uri)
ResolveRemoteAccountService.new.call(uri)
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment