diff options
author | Joas Schilling <coding@schilljs.com> | 2020-05-08 17:37:14 +0300 |
---|---|---|
committer | Daniel Rudolf <github.com@daniel-rudolf.de> | 2020-05-08 17:37:14 +0300 |
commit | 2935fe77aba14042e743e5ee4037f4023d122275 (patch) | |
tree | ba94337d2f1c8d9df74c0be457f75e9c687d34f4 /lib | |
parent | 0c57a68449789acb51b7237e8a0164e21323065a (diff) |
Fix TypeError in talk:room:create command
Signed-off-by: Daniel Rudolf <github.com@daniel-rudolf.de>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Command/Room/Create.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/Command/Room/Create.php b/lib/Command/Room/Create.php index ade38c826..7ee58c646 100644 --- a/lib/Command/Room/Create.php +++ b/lib/Command/Room/Create.php @@ -121,14 +121,19 @@ class Create extends Base { try { $this->setRoomReadOnly($room, $readonly); - $this->setRoomPassword($room, $password); + + if ($password !== null) { + $this->setRoomPassword($room, $password); + } $this->addRoomParticipants($room, $users); $this->addRoomParticipantsByGroup($room, $groups); $this->addRoomParticipantsByCircle($room, $circles); $this->addRoomModerators($room, $moderators); - $this->setRoomOwner($room, $owner); + if ($owner !== null) { + $this->setRoomOwner($room, $owner); + } } catch (Exception $e) { $room->deleteRoom(); |