From 0c8c97171affb924b1153264474664925ec8acba Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sat, 23 Mar 2019 22:16:12 -0400 Subject: [PATCH] Revert logic change in query in NotificationsManager->setSeen --- src/Core/NotificationsManager.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Core/NotificationsManager.php b/src/Core/NotificationsManager.php index f9a286b0e..bc1d1a00a 100644 --- a/src/Core/NotificationsManager.php +++ b/src/Core/NotificationsManager.php @@ -108,7 +108,13 @@ class NotificationsManager extends BaseObject */ public function setSeen($note, $seen = true) { - return DBA::update('notify', ['seen' => $seen], ['link' => $note['link'], 'parent' => $note['parent'], 'otype' => $note['otype'], 'uid' => local_user()]); + return DBA::update('notify', ['seen' => $seen], [ + '(`link` = ? OR (`parent` != 0 AND `parent` = ? AND `otype` = ?)) AND `uid` = ?', + $note['link'], + $note['parent'], + $note['otype'], + local_user() + ]); } /**