about summary refs log tree commit diff
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2020-08-24 16:56:21 +0200
committerGitHub <noreply@github.com>2020-08-24 16:56:21 +0200
commit92319d73409a02689e05ae491a15ce81003a7b7e (patch)
tree90939fc7ca4bdf4abe2a2302e722f0789180d905
parente8d41bc2fe9418613cdc118c8674fc5fe7856685 (diff)
Fix dereferencing remote statuses not using the correct account (#14656)
Follow-up to #14359

In the case of limited toots, the receiver may not be explicitly part of the
audience. If a specific user's inbox URI was specified, it makes sense to
dereference the toot from the corresponding user, instead of trying to find
someone in the explicit audience.
-rw-r--r--app/lib/activitypub/activity.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/lib/activitypub/activity.rb b/app/lib/activitypub/activity.rb
index f0ef4d553..a379a7ef4 100644
--- a/app/lib/activitypub/activity.rb
+++ b/app/lib/activitypub/activity.rb
@@ -168,6 +168,8 @@ class ActivityPub::Activity
   end
 
   def signed_fetch_account
+    return Account.find(@options[:delivered_to_account_id]) if @options[:delivered_to_account_id].present?
+
     first_mentioned_local_account || first_local_follower
   end