From cc91446c186a98a5761c3dd5790cddbd9dfc15b7 Mon Sep 17 00:00:00 2001 From: Mario Date: Sat, 3 May 2025 18:03:24 +0000 Subject: unseen items: only show announce activities but not the resulting item. also fix a missing operator --- Zotlabs/Module/Sse_bs.php | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'Zotlabs/Module') diff --git a/Zotlabs/Module/Sse_bs.php b/Zotlabs/Module/Sse_bs.php index a76cea3c2..66d46eaef 100644 --- a/Zotlabs/Module/Sse_bs.php +++ b/Zotlabs/Module/Sse_bs.php @@ -230,7 +230,8 @@ class Sse_bs extends Controller { AND item.created <= '%s' AND item.item_unseen = 1 AND item.item_wall = 0 AND item.item_private IN (0, 1) AND item.obj_type NOT IN ('Document', 'Video', 'Audio', 'Image') - AND item.author_xchan != '%s' + AND NOT (item.verb = 'Announce' AND item.item_thread_top = 1) -- only show the announce activity and not the resulting item + AND NOT item.author_xchan = '%s' $item_normal $sql_extra $sql_extra2 @@ -314,7 +315,8 @@ class Sse_bs extends Controller { AND item.created <= '%s' AND item.item_unseen = 1 AND item.item_private = 2 AND item.obj_type NOT IN ('Document', 'Video', 'Audio', 'Image') - AND item.author_xchan != '%s' + AND NOT (item.verb = 'Announce' AND item.item_thread_top = 1) -- only show the announce activity and not the resulting item + AND NOT item.author_xchan = '%s' $item_normal $sql_extra $sql_extra2 @@ -398,7 +400,8 @@ class Sse_bs extends Controller { AND item.created <= '%s' AND item.item_unseen = 1 AND item.item_wall = 1 AND item.item_private IN (0, 1) AND item.obj_type NOT IN ('Document', 'Video', 'Audio', 'Image') - AND item.author_xchan != '%s' + AND NOT (item.verb = 'Announce' AND item.item_thread_top = 1) -- only show the announce activity and not the resulting item + AND NOT item.author_xchan = '%s' $item_normal $sql_extra $sql_extra2 @@ -504,9 +507,10 @@ class Sse_bs extends Controller { LEFT JOIN item tp ON item.thr_parent = tp.mid AND item.uid = tp.uid WHERE true $uids AND item.created <= '%s' - AND item.obj_type NOT IN ('Document', 'Video', 'Audio', 'Image') - AND item.author_xchan != '%s' AND item.created > '%s' + AND item.obj_type NOT IN ('Document', 'Video', 'Audio', 'Image') + AND NOT (item.verb = 'Announce' AND item.item_thread_top = 1) -- only show the announce activity not the resulting item + AND NOT item.author_xchan = '%s' $item_normal $sql_extra $sql_extra2 -- cgit v1.2.3