]> git.mxchange.org Git - friendica.git/blobdiff - src/Repository/Notification.php
Meaningful notification message
[friendica.git] / src / Repository / Notification.php
index 39abdad199f5b8211c123cebe3a2d645720deb24..1748759b607a09f0f3c4e8ca72b1d1c30cc8de1f 100644 (file)
@@ -87,8 +87,13 @@ class Notification extends BaseRepository
        public function setSeen(bool $seen = true, Model\Notification $notify = null)
        {
                if (empty($notify)) {
+                       $this->dba->update('notification', ['seen' => $seen], ['uid' => local_user()]);
                        $conditions = ['uid' => local_user()];
                } else {
+                       if (!empty($notify->{'uri-id'})) {
+                               $this->dba->update('notification', ['seen' => $seen], ['uid' => local_user(), 'target-uri-id' => $notify->{'uri-id'}]);
+                       }
+
                        $conditions = ['(`link` = ? OR (`parent` != 0 AND `parent` = ? AND `otype` = ?)) AND `uid` = ?',
                                $notify->link,
                                $notify->parent,