diff options
-rw-r--r-- | lib/Notification/Listener.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/Notification/Listener.php b/lib/Notification/Listener.php index f0f7a1037..51e8bfe1a 100644 --- a/lib/Notification/Listener.php +++ b/lib/Notification/Listener.php @@ -349,21 +349,23 @@ class Listener implements IEventListener { $this->notificationManager->setPreparingPushNotification(true); $this->preparedCallNotifications[$languageCode] = $this->notificationProvider->prepare($translatedNotification, $languageCode); $this->notificationManager->setPreparingPushNotification(false); - $notification = $translatedNotification; + $userNotification = $translatedNotification; if ($room->getToken() === 'c9bui2ju') { \OC::$server->getLogger()->warning('Debugging step #7.2.' . $languageCode . ': ' . microtime(true)); } } else { - $notification = $this->preparedCallNotifications[$languageCode]; + $userNotification = $this->preparedCallNotifications[$languageCode]; if ($room->getToken() === 'c9bui2ju') { \OC::$server->getLogger()->warning('Debugging step #7.2.reused.' . $languageCode . ': ' . microtime(true)); } } + } else { + $userNotification = $notification; } try { - $notification->setUser($userId); - $this->notificationManager->notify($notification); + $userNotification->setUser($userId); + $this->notificationManager->notify($userNotification); } catch (\InvalidArgumentException $e) { $this->logger->error($e->getMessage(), ['exception' => $e]); } |