diff --git a/lib/Listener/RestrictStartingCalls.php b/lib/Listener/RestrictStartingCalls.php index f88ab25813e..80d13d89695 100644 --- a/lib/Listener/RestrictStartingCalls.php +++ b/lib/Listener/RestrictStartingCalls.php @@ -28,6 +28,7 @@ use OCA\Talk\Events\AParticipantModifiedEvent; use OCA\Talk\Events\BeforeParticipantModifiedEvent; use OCA\Talk\Exceptions\ForbiddenException; +use OCA\Talk\Participant; use OCA\Talk\Room; use OCA\Talk\Service\ParticipantService; use OCP\EventDispatcher\Event; @@ -57,6 +58,11 @@ public function handle(Event $event): void { return; } + if ($event->getNewValue() === Participant::FLAG_DISCONNECTED + || $event->getOldValue() !== Participant::FLAG_DISCONNECTED) { + return; + } + $room = $event->getRoom(); if ($room->getType() === Room::TYPE_PUBLIC && $room->getObjectType() === Room::OBJECT_TYPE_VIDEO_VERIFICATION) {