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
path: root/lib
diff options
context:
space:
mode:
authorDaniel Rudolf <github.com@daniel-rudolf.de>2020-05-06 12:10:55 +0300
committerDaniel Rudolf <github.com@daniel-rudolf.de>2020-05-06 12:11:18 +0300
commitb2664ba7a9e9d7267c86ae951adfdd9f857a4f63 (patch)
tree9e9f927136eeda81a834b8792f1c14b6115e3713 /lib
parent7cd525d8a621b79a2135ce49b8b8590909740281 (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')
-rw-r--r--lib/Command/Room/TRoomCommand.php6
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) {