]> cat aescling's git repositories - mastodon.git/commitdiff
Use username/domain to match existing accounts in ActivityPub (#6842)
authorEugen Rochko <eugen@zeonfederated.com>
Tue, 20 Mar 2018 13:57:46 +0000 (14:57 +0100)
committerGitHub <noreply@github.com>
Tue, 20 Mar 2018 13:57:46 +0000 (14:57 +0100)
See also: #6837, #6667

app/services/activitypub/process_account_service.rb

index 68e9db766c4a7514848fb5d7da9a3c58ea2d58b8..7d8dc1369128f1eabd513b31b0820fe13ab2c5ed 100644 (file)
@@ -16,7 +16,7 @@ class ActivityPub::ProcessAccountService < BaseService
 
     RedisLock.acquire(lock_options) do |lock|
       if lock.acquired?
-        @account        = Account.find_by(uri: @uri)
+        @account        = Account.find_remote(@username, @domain)
         @old_public_key = @account&.public_key
         @old_protocol   = @account&.protocol