Extract host from ap_id, add index

This commit is contained in:
eal 2018-06-06 21:13:40 +03:00
commit 29c9c8d93b
2 changed files with 9 additions and 1 deletions

View file

@ -445,7 +445,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do
activity in query,
where: fragment("not (? = ANY(?))", activity.actor, ^blocks),
where: fragment("not (?->'to' \\?| ?)", activity.data, ^blocks),
where: fragment("not (? ~ ANY(?))", activity.actor, ^domain_blocks)
where: fragment("not (split_part(?, '/', 3) = ANY(?))", activity.actor, ^domain_blocks)
)
end