diff options
author | Thibaut Girka <thib@sitedethib.com> | 2020-02-25 14:28:13 +0100 |
---|---|---|
committer | Thibaut Girka <thib@sitedethib.com> | 2020-02-25 14:28:13 +0100 |
commit | 85933bc9ff5869e69403315a30c3027d59c7e60d (patch) | |
tree | ea2bab292d7fdc97f529aa447300017c4ede00af /app/services/activitypub/process_account_service.rb | |
parent | 0d41fef50618e3d58255b4f4082326e83ff06982 (diff) | |
parent | 7face973fa1c7d6c18b06d427ea0b7a741d11466 (diff) |
Merge branch 'master' into glitch-soc/merge-upstream
Diffstat (limited to 'app/services/activitypub/process_account_service.rb')
-rw-r--r-- | app/services/activitypub/process_account_service.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/app/services/activitypub/process_account_service.rb b/app/services/activitypub/process_account_service.rb index cef658e19..d5ede0388 100644 --- a/app/services/activitypub/process_account_service.rb +++ b/app/services/activitypub/process_account_service.rb @@ -18,9 +18,10 @@ class ActivityPub::ProcessAccountService < BaseService RedisLock.acquire(lock_options) do |lock| if lock.acquired? - @account = Account.find_remote(@username, @domain) - @old_public_key = @account&.public_key - @old_protocol = @account&.protocol + @account = Account.remote.find_by(uri: @uri) if @options[:only_key] + @account ||= Account.find_remote(@username, @domain) + @old_public_key = @account&.public_key + @old_protocol = @account&.protocol create_account if @account.nil? update_account |