From c3a07035646b255bc5f33743d13defbaa69d9991 Mon Sep 17 00:00:00 2001 From: Alexander Tumin Date: Tue, 7 Feb 2023 15:30:07 +0300 Subject: Require related object for notifications to filter on content --- lib/pleroma/notification.ex | 1 + 1 file changed, 1 insertion(+) (limited to 'lib') diff --git a/lib/pleroma/notification.ex b/lib/pleroma/notification.ex index 60c1a80ba..48d467c59 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 -- cgit v1.2.3