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:
authorJoas Schilling <coding@schilljs.com>2020-11-03 11:07:43 +0300
committerJoas Schilling <coding@schilljs.com>2020-11-26 11:46:44 +0300
commit02aa7650cbaa20356d9eaf6a37d8984bd76b750e (patch)
tree9e29fee121a416c7cfd19668c45191e156a0b8ee /lib/Service
parent1c0c8931d0ba2c6dc70bed5962ceb14ab1c2456c (diff)
Only delete users that are guests as actor type not participant type
So PINs are retained when a user hangs up the phone Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/Service')
-rw-r--r--lib/Service/ParticipantService.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Service/ParticipantService.php b/lib/Service/ParticipantService.php
index ca95e23ff..bdf1fe5b3 100644
--- a/lib/Service/ParticipantService.php
+++ b/lib/Service/ParticipantService.php
@@ -300,7 +300,7 @@ class ParticipantService {
}
public function leaveRoomAsSession(Room $room, Participant $participant): void {
- if (!$participant->isGuest()) {
+ if ($participant->getAttendee()->getActorType() !== Attendee::ACTOR_GUESTS) {
$event = new ParticipantEvent($room, $participant);
$this->dispatcher->dispatch(Room::EVENT_BEFORE_ROOM_DISCONNECT, $event);
} else {
@@ -315,12 +315,12 @@ class ParticipantService {
$this->sessionMapper->deleteByAttendeeId($participant->getAttendee()->getId());
}
- if ($participant->isGuest()
+ if ($participant->getAttendee()->getActorType() === Attendee::ACTOR_GUESTS
|| $participant->getAttendee()->getParticipantType() === Participant::USER_SELF_JOINED) {
$this->attendeeMapper->delete($participant->getAttendee());
}
- if (!$participant->isGuest()) {
+ if ($participant->getAttendee()->getActorType() !== Attendee::ACTOR_GUESTS) {
$this->dispatcher->dispatch(Room::EVENT_AFTER_ROOM_DISCONNECT, $event);
} else {
$this->dispatcher->dispatch(Room::EVENT_AFTER_PARTICIPANT_REMOVE, $event);