Skip to content

Commit

Permalink
Merge pull request #11014 from nextcloud/bugfix/noid/fix-scaling-end-…
Browse files Browse the repository at this point in the history
…call-for-everyone

fix(calls): Remove a query in a loop when ending call for everyone
  • Loading branch information
nickvergessen authored Nov 28, 2023
2 parents 284f3bd + 76fac5f commit 5872955
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/Listener/RestrictStartingCalls.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 5872955

Please sign in to comment.