summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2023-05-02 10:03:38 +0200
committerJoas Schilling <coding@schilljs.com>2023-05-03 08:51:14 +0200
commit7dc8e402294d5185aa214e6c0d413066dc863a31 (patch)
tree4d09d7982f25830835f90a7e9c4718f87cba526c /lib
parentb140bcf69116e5732c510f83ca368f7ed816cb12 (diff)
fix(participants): Migrate self-joined users when assigning permissions
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/Service/ParticipantService.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Service/ParticipantService.php b/lib/Service/ParticipantService.php
index 225f32986..4f14b456c 100644
--- a/lib/Service/ParticipantService.php
+++ b/lib/Service/ParticipantService.php
@@ -242,6 +242,9 @@ class ParticipantService {
$this->dispatcher->dispatch(Room::EVENT_BEFORE_PARTICIPANT_PERMISSIONS_SET, $event);
$attendee->setPermissions($newPermissions);
+ if ($attendee->getParticipantType() === Participant::USER_SELF_JOINED) {
+ $attendee->setParticipantType(Participant::USER);
+ }
$this->attendeeMapper->update($attendee);
$this->dispatcher->dispatch(Room::EVENT_AFTER_PARTICIPANT_PERMISSIONS_SET, $event);