Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/spreed.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Notification/Notifier.php')
-rw-r--r--lib/Notification/Notifier.php17
1 files changed, 12 insertions, 5 deletions
diff --git a/lib/Notification/Notifier.php b/lib/Notification/Notifier.php
index 092cf186b..9ff13f7a6 100644
--- a/lib/Notification/Notifier.php
+++ b/lib/Notification/Notifier.php
@@ -179,11 +179,18 @@ class Notifier implements INotifier {
throw new AlreadyProcessedException();
}
- try {
- $participant = $room->getParticipant($userId);
- } catch (ParticipantNotFoundException $e) {
- // Room does not exist
- throw new AlreadyProcessedException();
+ if ($this->notificationManager->isPreparingPushNotification() && $notification->getSubject() === 'call') {
+ // Skip the participant check when we generate push notifications
+ // we just looped over the participants to create the notification,
+ // they can not be removed between these 2 steps, but we can save
+ // n queries.
+ } else {
+ try {
+ $participant = $room->getParticipant($userId);
+ } catch (ParticipantNotFoundException $e) {
+ // Room does not exist
+ throw new AlreadyProcessedException();
+ }
}
$notification