]> git.mxchange.org Git - friendica.git/commitdiff
Revert logic change in query in NotificationsManager->setSeen
authorHypolite Petovan <hypolite@mrpetovan.com>
Sun, 24 Mar 2019 02:16:12 +0000 (22:16 -0400)
committerHypolite Petovan <hypolite@mrpetovan.com>
Sun, 24 Mar 2019 02:16:12 +0000 (22:16 -0400)
src/Core/NotificationsManager.php

index f9a286b0e76d113bc55a2dd9e7f9007d0822ecc2..bc1d1a00aa656993743b993dc9beb002ecbfea48 100644 (file)
@@ -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()
+               ]);
        }
 
        /**