Commit de9acebb authored by William Pitcock's avatar William Pitcock

activitypub: use jsonb query for containment instead of recipients_to/recipients_cc.

parent b1174672
......@@ -415,11 +415,11 @@ defp restrict_to_cc(query, recipients_to, recipients_cc) do
activity in query,
where:
fragment(
"(? && ?) or (? && ?)",
"(?->'to' \\?| ?) or (?->'cc' \\?| ?)",
activity.data,
^recipients_to,
activity.recipients_to,
^recipients_cc,
activity.recipients_cc
activity.data,
^recipients_cc
)
)
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment