]> cat aescling's git repositories - mastodon.git/commitdiff
Fix mention processing for unknwon accounts on incoming ActivityPub Notes (#10125)
authorThibG <thib@sitedethib.com>
Wed, 27 Feb 2019 13:57:14 +0000 (14:57 +0100)
committerEugen Rochko <eugen@zeonfederated.com>
Wed, 27 Feb 2019 13:57:14 +0000 (14:57 +0100)
`::FetchRemoteAccountService` is not `ActivityPub::FetchRemoteAccountService`,
its second argument is the pre-fetched body. Passing `id: false` actually passed
a `Hash` as the prefetched body, instead of properly resolving unknown remote
accounts.

app/lib/activitypub/activity/create.rb

index d7bd65c80668b608c859ce97b54ed5090ed29409..6d58aba7096b14f31097b038269ac42bcf00a2cd 100644 (file)
@@ -159,7 +159,7 @@ class ActivityPub::Activity::Create < ActivityPub::Activity
     return if tag['href'].blank?
 
     account = account_from_uri(tag['href'])
-    account = ::FetchRemoteAccountService.new.call(tag['href'], id: false) if account.nil?
+    account = ::FetchRemoteAccountService.new.call(tag['href']) if account.nil?
 
     return if account.nil?