projects
/
akkoma
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5454ec6
)
ActivityPub: Use recipients fields.
author
lain
<lain@soykaf.club>
Thu, 15 Feb 2018 19:32:07 +0000
(20:32 +0100)
committer
lain
<lain@soykaf.club>
Thu, 15 Feb 2018 19:32:07 +0000
(20:32 +0100)
lib/pleroma/web/activity_pub/activity_pub.ex
patch
|
blob
|
history
diff --git
a/lib/pleroma/web/activity_pub/activity_pub.ex
b/lib/pleroma/web/activity_pub/activity_pub.ex
index a7b2988b9afe506c352e107c304c852e8a06e836..4848cc5421fd3142edba43f142027da6eda9d706 100644
(file)
--- 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