From 9daeb552ddfa03c06b414e1c9ebe49fd06c9bac8 Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 5 Jun 2022 16:54:29 +0000 Subject: [PATCH] Suppress dislikes --- src/Navigation/Notifications/Repository/Notification.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Navigation/Notifications/Repository/Notification.php b/src/Navigation/Notifications/Repository/Notification.php index e61ea57e2a..e7ef062114 100644 --- a/src/Navigation/Notifications/Repository/Notification.php +++ b/src/Navigation/Notifications/Repository/Notification.php @@ -119,7 +119,7 @@ class Notification extends BaseRepository { $condition = ["`type` & ? != 0", $this->pconfig->get($uid, 'system', 'notify_type', 3 | 72 | 4 | 16 | 32) | 128 | 256]; if (!$this->pconfig->get($uid, 'system', 'notify_like')) { - $condition = DBA::mergeConditions($condition, ['`vid` != ?', Verb::getID(\Friendica\Protocol\Activity::LIKE)]); + $condition = DBA::mergeConditions($condition, ['NOT `vid` IN (?, ?)', Verb::getID(\Friendica\Protocol\Activity::LIKE), Verb::getID(\Friendica\Protocol\Activity::DISLIKE)]); } if (!$this->pconfig->get($uid, 'system', 'notify_announce')) { @@ -142,8 +142,9 @@ class Notification extends BaseRepository $like_condition = ''; if (!$this->pconfig->get($uid, 'system', 'notify_like')) { - $like_condition = 'AND vid != ?'; + $like_condition = 'AND NOT `vid` IN (?, ?)'; $values[] = Verb::getID(\Friendica\Protocol\Activity::LIKE); + $values[] = Verb::getID(\Friendica\Protocol\Activity::DISLIKE); } $announce_condition = '';