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:
authorVincent Petry <vincent@nextcloud.com>2020-12-02 15:55:24 +0300
committerVincent Petry <vincent@nextcloud.com>2020-12-11 20:15:48 +0300
commit65238d1b8f487596dc79b19fe6a6be3a4fb417be (patch)
treedf44da5a069d248766065a21f66e76725c98b1eb /lib/Command/Room/Create.php
parent353206e1e695d531f2a51003ac93cfc3cd669bce (diff)
Adjustments for listable rooms after review
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
Diffstat (limited to 'lib/Command/Room/Create.php')
-rw-r--r--lib/Command/Room/Create.php15
1 files changed, 14 insertions, 1 deletions
diff --git a/lib/Command/Room/Create.php b/lib/Command/Room/Create.php
index eaaae0396..f241fe6b8 100644
--- a/lib/Command/Room/Create.php
+++ b/lib/Command/Room/Create.php
@@ -110,7 +110,12 @@ class Create extends Base {
return 1;
}
- if (!in_array($listable, [null, '0', '1', '2', '3'], true)) {
+ if (!in_array($listable, [
+ null,
+ (string)Room::LISTABLE_NONE,
+ (string)Room::LISTABLE_USERS,
+ (string)Room::LISTABLE_ALL,
+ ], true)) {
$output->writeln('<error>Invalid value for option "--listable" given.</error>');
return 1;
}
@@ -167,6 +172,14 @@ class Create extends Base {
case 'owner':
case 'moderator':
return $this->completeParticipantValues($context);
+ case 'readonly':
+ return ['1', '0'];
+ case 'listable':
+ return [
+ (string)Room::LISTABLE_ALL,
+ (string)Room::LISTABLE_USERS,
+ (string)Room::LISTABLE_NONE,
+ ];
}
return parent::completeOptionValues($optionName, $context);