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
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Handler.php')
-rw-r--r--lib/Handler.php11
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/Handler.php b/lib/Handler.php
index cd505f6..71b4606 100644
--- a/lib/Handler.php
+++ b/lib/Handler.php
@@ -100,14 +100,17 @@ class Handler {
$deleted[$row['user']] = [];
}
- $deleted[$row['user']][] = (int) $row['notification_id'];
+ $deleted[$row['user']][] = [
+ 'id' => (int) $row['notification_id'],
+ 'app' => $row['app'],
+ ];
$notifications[(int) $row['notification_id']] = $this->notificationFromRow($row);
}
$statement->closeCursor();
- foreach ($deleted as $user => $notificationIds) {
- foreach ($notificationIds as $notificationId) {
- $this->deleteById($notificationId, $user, $notifications[$notificationId]);
+ foreach ($deleted as $user => $entries) {
+ foreach ($entries as $entry) {
+ $this->deleteById($entry['id'], $user, $notifications[$entry['id']]);
}
}