* Returns only the most recent notifications for the same conversation or contact
*
* @param int $uid
+ *
* @return Collection\Notifications
* @throws Exception
*/
* Returns only the most recent notifications for the same conversation or contact
*
* @param int $uid
+ *
* @return Collection\Notifications
* @throws Exception
*/
* @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
$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());
}