Merge branch 'notification-content-filtering-noobj' into 'develop'

Require related object for content-filtering on notification

See merge request pleroma/pleroma!3837
This commit is contained in:
lain 2023-02-09 19:54:59 +00:00
commit 7abb248ceb
2 changed files with 28 additions and 0 deletions

View file

@ -178,6 +178,7 @@ defmodule Pleroma.Notification do
from([_n, a, o] in query,
where:
fragment("not(?->>'content' ~* ?)", o.data, ^regex) or
fragment("?->>'content' is null", o.data) or
fragment("?->>'actor' = ?", o.data, ^user.ap_id)
)
end