aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Widget/Messages.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2022-12-27 16:08:08 +0000
committerMario <mario@mariovavti.com>2022-12-27 16:08:08 +0000
commita30cfd8fec638a0f1d428c456f593e773f18b1bf (patch)
tree0557373058ce71849f92c2eccd7c7b67f9088b8a /Zotlabs/Widget/Messages.php
parent633cd11c5b129a9712dbc6e7867284fa7999cea5 (diff)
downloadvolse-hubzilla-a30cfd8fec638a0f1d428c456f593e773f18b1bf.tar.gz
volse-hubzilla-a30cfd8fec638a0f1d428c456f593e773f18b1bf.tar.bz2
volse-hubzilla-a30cfd8fec638a0f1d428c456f593e773f18b1bf.zip
filter approvals
Diffstat (limited to 'Zotlabs/Widget/Messages.php')
-rw-r--r--Zotlabs/Widget/Messages.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/Zotlabs/Widget/Messages.php b/Zotlabs/Widget/Messages.php
index a7e3b08fc..8c413e16e 100644
--- a/Zotlabs/Widget/Messages.php
+++ b/Zotlabs/Widget/Messages.php
@@ -91,8 +91,11 @@ class Messages {
$type_sql = ' AND i.item_private IN (0, 1) ';
}
+ // FEP-5624 filter approvals for comments
+ $approvals_c = " AND c.verb NOT IN ('" . dbesc(ACTIVITY_ATTEND) . "', 'Accept', '" . dbesc(ACTIVITY_ATTENDNO) . "', 'Reject') ";
+
$items = q("SELECT *,
- (SELECT count(*) FROM item c WHERE c.uid = %d AND c.parent = i.parent AND c.item_unseen = 1 AND c.item_thread_top = 0 $item_normal_c $vnotify_sql_c) AS unseen_count
+ (SELECT count(*) FROM item c WHERE c.uid = %d AND c.parent = i.parent AND c.item_unseen = 1 AND c.item_thread_top = 0 $item_normal_c $approvals_c $vnotify_sql_c) AS unseen_count
FROM item i WHERE i.uid = %d
AND i.created <= '%s'
$type_sql