diff options
author | Joas Schilling <coding@schilljs.com> | 2019-07-22 16:45:08 +0300 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2019-07-22 16:46:56 +0300 |
commit | 86543272ee11751d57fcdb54afd627fd9335d3af (patch) | |
tree | b08bc0c7f863859804ab09466490617f853157f2 /lib/Notification/Notifier.php | |
parent | a8435be8bb3e55e997a87c3d0ac276507390291f (diff) |
Push notifications are rendered pre joining the call
... so we should just assum someone will be in the call soon.
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/Notification/Notifier.php')
-rw-r--r-- | lib/Notification/Notifier.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Notification/Notifier.php b/lib/Notification/Notifier.php index 1e9d1ea59..3c11cecab 100644 --- a/lib/Notification/Notifier.php +++ b/lib/Notification/Notifier.php @@ -406,7 +406,7 @@ class Notifier implements INotifier { $calleeId = $parameters['callee']; $user = $this->userManager->get($calleeId); if ($user instanceof IUser) { - if ($room->hasSessionsInCall()) { + if ($this->notificationManager->isPreparingPushNotification() || $room->hasSessionsInCall()) { $notification = $this->addActionButton($notification, $l->t('Answer call')); $subject = $l->t('{user} wants to talk with you'); } else { @@ -436,7 +436,7 @@ class Notifier implements INotifier { } } else if (\in_array($room->getType(), [Room::GROUP_CALL, Room::PUBLIC_CALL], true)) { - if ($room->hasSessionsInCall()) { + if ($this->notificationManager->isPreparingPushNotification() || $room->hasSessionsInCall()) { $notification = $this->addActionButton($notification, $l->t('Join call')); $subject = $l->t('A group call has started in {call}'); } else { @@ -493,7 +493,7 @@ class Notifier implements INotifier { throw new AlreadyProcessedException(); } - $callIsActive = $room->hasSessionsInCall(); + $callIsActive = $this->notificationManager->isPreparingPushNotification() || $room->hasSessionsInCall(); if ($callIsActive) { $notification = $this->addActionButton($notification, $l->t('Answer call')); } else { |