about summary refs log tree commit diff
path: root/app/services/activitypub/process_account_service.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/services/activitypub/process_account_service.rb')
-rw-r--r--app/services/activitypub/process_account_service.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/app/services/activitypub/process_account_service.rb b/app/services/activitypub/process_account_service.rb
index 8064fcb00..414dbfda7 100644
--- a/app/services/activitypub/process_account_service.rb
+++ b/app/services/activitypub/process_account_service.rb
@@ -20,8 +20,10 @@ class ActivityPub::ProcessAccountService < BaseService
         @account        = Account.find_remote(@username, @domain)
         @old_public_key = @account&.public_key
 
-        create_account if @account.nil?
+        is_new_account = @account.nil?
+        create_account if is_new_account
         update_account
+        update_account_domain_blocks if is_new_account
         process_tags
         process_attachments
       else
@@ -105,6 +107,11 @@ class ActivityPub::ProcessAccountService < BaseService
     VerifyAccountLinksWorker.perform_async(@account.id)
   end
 
+  def update_account_domain_blocks
+    return if @account.domain.nil? || @account.local?
+    UpdateAccountDomainBlocksWorker.perform_async(@account.id)
+  end
+
   def actor_type
     if @json['type'].is_a?(Array)
       @json['type'].find { |type| ActivityPub::FetchRemoteAccountService::SUPPORTED_TYPES.include?(type) }