diff options
author | Vincent Petry <vincent@nextcloud.com> | 2020-12-02 15:55:24 +0300 |
---|---|---|
committer | Vincent Petry <vincent@nextcloud.com> | 2020-12-11 20:15:48 +0300 |
commit | 65238d1b8f487596dc79b19fe6a6be3a4fb417be (patch) | |
tree | df44da5a069d248766065a21f66e76725c98b1eb /lib/Command/Room/Update.php | |
parent | 353206e1e695d531f2a51003ac93cfc3cd669bce (diff) |
Adjustments for listable rooms after review
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
Diffstat (limited to 'lib/Command/Room/Update.php')
-rw-r--r-- | lib/Command/Room/Update.php | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/lib/Command/Room/Update.php b/lib/Command/Room/Update.php index af87053e5..037e7d59a 100644 --- a/lib/Command/Room/Update.php +++ b/lib/Command/Room/Update.php @@ -104,7 +104,12 @@ class Update 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; } @@ -168,7 +173,11 @@ class Update extends Base { case 'readonly': return ['1', '0']; case 'listable': - return ['2', '1', '0']; + return [ + (string)Room::LISTABLE_ALL, + (string)Room::LISTABLE_USERS, + (string)Room::LISTABLE_NONE, + ]; case 'owner': return $this->completeParticipantValues($context); |