diff options
author | Mario <mario@mariovavti.com> | 2024-02-25 19:29:50 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2024-02-25 19:29:50 +0000 |
commit | 3dd739424718596b94f5a61d2015388db2491999 (patch) | |
tree | 336e19816349b7b0c3d5c4ba49bf4bf19ae4e46a /Zotlabs/Widget/Messages.php | |
parent | b860b730a9fe718ad35cd918ab237afe42cf386c (diff) | |
download | volse-hubzilla-3dd739424718596b94f5a61d2015388db2491999.tar.gz volse-hubzilla-3dd739424718596b94f5a61d2015388db2491999.tar.bz2 volse-hubzilla-3dd739424718596b94f5a61d2015388db2491999.zip |
AS2
Diffstat (limited to 'Zotlabs/Widget/Messages.php')
-rw-r--r-- | Zotlabs/Widget/Messages.php | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/Zotlabs/Widget/Messages.php b/Zotlabs/Widget/Messages.php index 6e452735a..157b3f535 100644 --- a/Zotlabs/Widget/Messages.php +++ b/Zotlabs/Widget/Messages.php @@ -75,16 +75,16 @@ class Messages { $vnotify_sql_i = ''; if (!($vnotify & VNOTIFY_LIKE)) { - $vnotify_sql_c = " AND c.verb NOT IN ('" . dbesc(ACTIVITY_LIKE) . "', '" . dbesc(ACTIVITY_DISLIKE) . "') "; - $vnotify_sql_i = " AND i.verb NOT IN ('" . dbesc(ACTIVITY_LIKE) . "', '" . dbesc(ACTIVITY_DISLIKE) . "') "; + $vnotify_sql_c = " AND c.verb NOT IN ('Like', 'Dislike', '" . dbesc(ACTIVITY_LIKE) . "', '" . dbesc(ACTIVITY_DISLIKE) . "') "; + $vnotify_sql_i = " AND i.verb NOT IN ('Like', 'Dislike', '" . dbesc(ACTIVITY_LIKE) . "', '" . dbesc(ACTIVITY_DISLIKE) . "') "; } elseif (!feature_enabled(local_channel(), 'dislike')) { - $vnotify_sql_c = " AND c.verb NOT IN ('" . dbesc(ACTIVITY_DISLIKE) . "') "; - $vnotify_sql_i = " AND i.verb NOT IN ('" . dbesc(ACTIVITY_DISLIKE) . "') "; + $vnotify_sql_c = " AND c.verb NOT IN ('Dislike', '" . dbesc(ACTIVITY_DISLIKE) . "') "; + $vnotify_sql_i = " AND i.verb NOT IN ('Dislike', '" . dbesc(ACTIVITY_DISLIKE) . "') "; } if($author) { - $author_sql = " AND i.owner_xchan = '" . protect_sprintf(dbesc($author)) . "' "; + $author_sql = " AND (i.owner_xchan = '" . protect_sprintf(dbesc($author)) . "' OR i.source_xchan = '" . protect_sprintf(dbesc($author)) . "') "; } switch($type) { @@ -101,11 +101,8 @@ 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 $approvals_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 $vnotify_sql_c) AS unseen_count FROM item i WHERE i.uid = %d AND i.created <= '%s' $type_sql |