summaryrefslogtreecommitdiffstats
path: root/lib/Service/ParticipantService.php
diff options
context:
space:
mode:
authorDaniel Calviño Sánchez <danxuliu@gmail.com>2023-02-08 15:34:18 +0100
committerDaniel Calviño Sánchez <danxuliu@gmail.com>2023-02-09 00:16:10 +0100
commitb82cc2341ccd601dec21f7ccfab79face6fda498 (patch)
tree8bceebdb9d10f6e767e600dbe2dd7f549f98e060 /lib/Service/ParticipantService.php
parent130dfd7731256bbd8e610084b2b0d1f5e2659d49 (diff)
Remove self-joined user after disconnecting from the room
This should not make any difference in the behaviour, but it looks more correct to first disconnect and then remove than the other way around. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'lib/Service/ParticipantService.php')
-rw-r--r--lib/Service/ParticipantService.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Service/ParticipantService.php b/lib/Service/ParticipantService.php
index 49136fb09..1318054fd 100644
--- a/lib/Service/ParticipantService.php
+++ b/lib/Service/ParticipantService.php
@@ -772,14 +772,14 @@ class ParticipantService {
$this->sessionMapper->deleteByAttendeeId($participant->getAttendee()->getId());
}
+ $this->dispatcher->dispatch(Room::EVENT_AFTER_ROOM_DISCONNECT, $event);
+
if ($participant->getAttendee()->getParticipantType() === Participant::USER_SELF_JOINED
&& empty($this->sessionMapper->findByAttendeeId($participant->getAttendee()->getId()))) {
$user = $this->userManager->get($participant->getAttendee()->getActorId());
$this->removeUser($room, $user, Room::PARTICIPANT_LEFT);
}
-
- $this->dispatcher->dispatch(Room::EVENT_AFTER_ROOM_DISCONNECT, $event);
}
public function removeAttendee(Room $room, Participant $participant, string $reason, bool $attendeeEventIsTriggeredAlready = false): void {