Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/notifications.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2019-12-09 15:41:22 +0300
committerRoeland Jago Douma <roeland@famdouma.nl>2019-12-10 16:56:43 +0300
commita10ca51583b874ac35ed78699463348d7218d628 (patch)
tree770a6f783498f07c7386fe21e1314b6635855ded /lib
parent065507974964d4ec6790737b648e8569a6faebe0 (diff)
Dismiss notifications properly
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'lib')
-rw-r--r--lib/Handler.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Handler.php b/lib/Handler.php
index 864f435..3eb7168 100644
--- a/lib/Handler.php
+++ b/lib/Handler.php
@@ -137,6 +137,9 @@ class Handler {
* @return bool
*/
public function deleteById(int $id, string $user): bool {
+ $notifcation = $this->getById($id, $user);
+ $this->manager->dismissNotification($notifcation);
+
$sql = $this->connection->getQueryBuilder();
$sql->delete('notifications')
->where($sql->expr()->eq('notification_id', $sql->createNamedParameter($id)))