diff --git a/lib/Notification/BackgroundJob.php b/lib/Notification/BackgroundJob.php index dd02078e0..afc99904a 100644 --- a/lib/Notification/BackgroundJob.php +++ b/lib/Notification/BackgroundJob.php @@ -31,6 +31,7 @@ class BackgroundJob extends QueuedJob { public function __construct( protected INotificationManager $notificationManager, ) { + parent::__construct(); } /** @@ -45,7 +46,7 @@ protected function run($argument) { ->setUser($argument['uid']); if ($this->notificationManager->getCount($notification) === 0) { - $notification->setDateTime(new \DateTime()); + $notification->setDateTime($this->time->getDateTime()); $this->notificationManager->notify($notification); } }