diff options
| author | lain <lain@soykaf.club> | 2018-02-15 20:32:07 +0100 | 
|---|---|---|
| committer | lain <lain@soykaf.club> | 2018-02-15 20:32:07 +0100 | 
| commit | 7851b9ba816148706328b7d16eef383ea9256795 (patch) | |
| tree | 2756b154764d392c1e23d369a56c8fde4fcd03ac | |
| parent | 5454ec6a6ccedb2647cb765251e4cef3df2fcaf3 (diff) | |
| download | pleroma-7851b9ba816148706328b7d16eef383ea9256795.tar.gz pleroma-7851b9ba816148706328b7d16eef383ea9256795.zip  | |
ActivityPub: Use recipients fields.
| -rw-r--r-- | lib/pleroma/web/activity_pub/activity_pub.ex | 7 | 
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/pleroma/web/activity_pub/activity_pub.ex b/lib/pleroma/web/activity_pub/activity_pub.ex index a7b2988b9..4848cc542 100644 --- a/lib/pleroma/web/activity_pub/activity_pub.ex +++ b/lib/pleroma/web/activity_pub/activity_pub.ex @@ -140,11 +140,8 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do    defp restrict_tag(query, _), do: query    defp restrict_recipients(query, recipients) do -    Enum.reduce(recipients, query, fn (recipient, q) -> -      map = %{ to: [recipient] } -      from activity in q, -      or_where: fragment(~s(? @> ?), activity.data, ^map) -    end) +    from activity in query, +     where: fragment("? && ?", ^recipients, activity.recipients)    end    defp restrict_local(query, %{"local_only" => true}) do  | 
