Skip to content

Commit

Permalink
Do not read the notification we just inserted
Browse files Browse the repository at this point in the history
Signed-off-by: Joas Schilling <coding@schilljs.com>
  • Loading branch information
nickvergessen committed Feb 24, 2022
1 parent 08bdf27 commit 49c81d8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/App.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,7 @@ public function notify(INotification $notification): void {
$notificationId = $this->handler->add($notification);

try {
$notificationToPush = $this->handler->getById($notificationId, $notification->getUser());
$this->push->pushToDevice($notificationId, $notificationToPush);
$this->push->pushToDevice($notificationId, $notification);
} catch (NotificationNotFoundException $e) {
throw new \InvalidArgumentException('Error while preparing push notification');
}
Expand Down

0 comments on commit 49c81d8

Please sign in to comment.