summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAlexander Tumin <iamtakingiteasy@eientei.org>2023-02-07 15:30:07 +0300
committerAlexander Tumin <iamtakingiteasy@eientei.org>2023-02-08 13:07:34 +0300
commit55a8aa978782b9f2ee34c21404a98af833451380 (patch)
treedccb3abce6a1f468b68685ccdfd59b254b3d8789 /lib
parent2a244b391d8c1d9d8e960532758110928cb5ef7c (diff)
downloadpleroma-55a8aa978782b9f2ee34c21404a98af833451380.tar.gz
pleroma-55a8aa978782b9f2ee34c21404a98af833451380.zip
Require related object for notifications to filter on content
Diffstat (limited to 'lib')
-rw-r--r--lib/pleroma/notification.ex1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/pleroma/notification.ex b/lib/pleroma/notification.ex
index aba6096bc..a76715f49 100644
--- a/lib/pleroma/notification.ex
+++ b/lib/pleroma/notification.ex
@@ -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