1
0
Fork 1
mirror of https://akkoma.dev/AkkomaGang/akkoma.git synced 2024-11-18 02:49:18 +00:00

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

This commit is contained in:
William Pitcock 2018-08-29 18:32:04 +00:00
parent b11746726e
commit de9acebbf3

View file

@ -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