diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2019-12-09 15:41:22 +0300 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2019-12-10 16:56:43 +0300 |
commit | a10ca51583b874ac35ed78699463348d7218d628 (patch) | |
tree | 770a6f783498f07c7386fe21e1314b6635855ded /lib | |
parent | 065507974964d4ec6790737b648e8569a6faebe0 (diff) |
Dismiss notifications properly
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Handler.php | 3 |
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))) |