diff options
author | Daniel Rudolf <github.com@daniel-rudolf.de> | 2020-05-06 12:10:55 +0300 |
---|---|---|
committer | Daniel Rudolf <github.com@daniel-rudolf.de> | 2020-05-06 12:11:18 +0300 |
commit | b2664ba7a9e9d7267c86ae951adfdd9f857a4f63 (patch) | |
tree | 9e9f927136eeda81a834b8792f1c14b6115e3713 /lib/Command | |
parent | 7cd525d8a621b79a2135ce49b8b8590909740281 (diff) |
Don't demote room owners to moderators in talk:room:promote command
Signed-off-by: Daniel Rudolf <github.com@daniel-rudolf.de>
Diffstat (limited to 'lib/Command')
-rw-r--r-- | lib/Command/Room/TRoomCommand.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Command/Room/TRoomCommand.php b/lib/Command/Room/TRoomCommand.php index 03289d65f..b7aa1361e 100644 --- a/lib/Command/Room/TRoomCommand.php +++ b/lib/Command/Room/TRoomCommand.php @@ -184,10 +184,14 @@ trait TRoomCommand $participants = []; foreach ($userIds as $userId) { try { - $participants[] = $room->getParticipant($userId); + $participant = $room->getParticipant($userId); } catch (ParticipantNotFoundException $e) { throw new InvalidArgumentException(sprintf("User '%s' is no participant.", $userId)); } + + if ($participant->getParticipantType() !== Participant::OWNER) { + $participants[] = $participant; + } } foreach ($participants as $participant) { |