summaryrefslogtreecommitdiffstats
path: root/lib/Notification/Notifier.php
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2023-11-29 05:50:28 +0100
committerJoas Schilling <coding@schilljs.com>2023-11-29 05:53:50 +0100
commit208518b0d2d6f1d1d4ac457c713bbed13d128b22 (patch)
tree5cb5ab2cdf196d1ec1707d0c097f125555a8aca1 /lib/Notification/Notifier.php
parentc8572d523c1e681f922879cf77baa269b763dee4 (diff)
Fix undefined $participant when calling a lobbied room
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/Notification/Notifier.php')
-rw-r--r--lib/Notification/Notifier.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/Notification/Notifier.php b/lib/Notification/Notifier.php
index 6121eb84f..4b825f1f7 100644
--- a/lib/Notification/Notifier.php
+++ b/lib/Notification/Notifier.php
@@ -224,6 +224,7 @@ class Notifier implements INotifier {
// 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.
+ $participant = null;
} else {
try {
$participant = $this->getParticipant($room, $userId);
@@ -248,8 +249,8 @@ class Notifier implements INotifier {
return $this->parseInvitation($notification, $room, $l);
}
if ($subject === 'call') {
- if ($room->getLobbyState() !== Webinary::LOBBY_NONE &&
- $participant instanceof Participant &&
+ if ($participant instanceof Participant &&
+ $room->getLobbyState() !== Webinary::LOBBY_NONE &&
!($participant->getPermissions() & Attendee::PERMISSIONS_LOBBY_IGNORE)) {
// User is blocked by the lobby, remove notification
throw new AlreadyProcessedException();
@@ -261,8 +262,8 @@ class Notifier implements INotifier {
return $this->parseCall($notification, $room, $l);
}
if ($subject === 'reply' || $subject === 'mention' || $subject === 'mention_direct' || $subject === 'mention_group' || $subject === 'mention_all' || $subject === 'chat' || $subject === 'reaction' || $subject === 'reminder') {
- if ($room->getLobbyState() !== Webinary::LOBBY_NONE &&
- $participant instanceof Participant &&
+ if ($participant instanceof Participant &&
+ $room->getLobbyState() !== Webinary::LOBBY_NONE &&
!($participant->getPermissions() & Attendee::PERMISSIONS_LOBBY_IGNORE)) {
// User is blocked by the lobby, remove notification
throw new AlreadyProcessedException();