]> git.mxchange.org Git - friendica.git/blobdiff - src/Navigation/Notifications/Repository/Notification.php
Rename Repository\Notify->NotifyOnDesktop to shouldShowOnDesktop
[friendica.git] / src / Navigation / Notifications / Repository / Notification.php
index bb835c33e9531e042a7d07d08a2eceb18a8a91ed..a9630464aa576113a64d987a749f4386baf417e2 100644 (file)
@@ -112,6 +112,7 @@ class Notification extends BaseRepository
         * Returns only the most recent notifications for the same conversation or contact
         *
         * @param int $uid
+        *
         * @return Collection\Notifications
         * @throws Exception
         */
@@ -139,6 +140,7 @@ class Notification extends BaseRepository
         * Returns only the most recent notifications for the same conversation or contact
         *
         * @param int $uid
+        *
         * @return Collection\Notifications
         * @throws Exception
         */
@@ -201,6 +203,7 @@ class Notification extends BaseRepository
         * @param int|null $min_id Retrieve models with an id no fewer than this, as close to it as possible
         * @param int|null $max_id Retrieve models with an id no greater than this, as close to it as possible
         * @param int      $limit
+        *
         * @return BaseCollection
         * @throws Exception
         * @see _selectByBoundaries
@@ -248,7 +251,7 @@ class Notification extends BaseRepository
                        $this->db->update(self::$table_name, $fields, ['id' => $Notification->id]);
                } else {
                        $fields['created'] = DateTimeFormat::utcNow();
-                       $this->db->insert(self::$table_name, $fields);
+                       $this->db->insert(self::$table_name, $fields, Database::INSERT_IGNORE);
 
                        $Notification = $this->selectOneById($this->db->lastInsertId());
                }