diff options
author | Daniel Rudolf <github.com@daniel-rudolf.de> | 2020-05-08 17:40:52 +0300 |
---|---|---|
committer | Daniel Rudolf <github.com@daniel-rudolf.de> | 2020-05-08 17:40:52 +0300 |
commit | 46a67e5b6e75fd7c9307f94ce7b4268c8f26da00 (patch) | |
tree | e89b633efeb95fee36e6e570bbad437fad4ce3b5 /lib/Command | |
parent | 2935fe77aba14042e743e5ee4037f4023d122275 (diff) |
Add --user option to talk:room:create and talk:room:add commands
Signed-off-by: Daniel Rudolf <github.com@daniel-rudolf.de>
Diffstat (limited to 'lib/Command')
-rw-r--r-- | lib/Command/Room/Add.php | 7 | ||||
-rw-r--r-- | lib/Command/Room/Create.php | 7 |
2 files changed, 8 insertions, 6 deletions
diff --git a/lib/Command/Room/Add.php b/lib/Command/Room/Add.php index b1d145d2d..743484005 100644 --- a/lib/Command/Room/Add.php +++ b/lib/Command/Room/Add.php @@ -60,9 +60,10 @@ class Add extends Base { 'token', InputArgument::REQUIRED, 'Token of the room to add users to' - )->addArgument( + )->addOption( 'user', - InputArgument::OPTIONAL | InputArgument::IS_ARRAY, + null, + InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, 'Invites the given users to the room' )->addOption( 'group', @@ -79,7 +80,7 @@ class Add extends Base { protected function execute(InputInterface $input, OutputInterface $output): ?int { $token = $input->getArgument('token'); - $users = $input->getArgument('user'); + $users = $input->getOption('user'); $groups = $input->getOption('group'); $circles = $input->getOption('circle'); diff --git a/lib/Command/Room/Create.php b/lib/Command/Room/Create.php index 7ee58c646..3113fae1c 100644 --- a/lib/Command/Room/Create.php +++ b/lib/Command/Room/Create.php @@ -58,9 +58,10 @@ class Create extends Base { 'name', InputArgument::REQUIRED, 'The name of the room to create' - )->addArgument( + )->addOption( 'user', - InputArgument::OPTIONAL | InputArgument::IS_ARRAY, + null, + InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, 'Invites the given users to the room to create' )->addOption( 'group', @@ -102,7 +103,7 @@ class Create extends Base { protected function execute(InputInterface $input, OutputInterface $output): ?int { $name = $input->getArgument('name'); - $users = $input->getArgument('user'); + $users = $input->getOption('user'); $groups = $input->getOption('group'); $circles = $input->getOption('circle'); $public = $input->getOption('public'); |