diff options
Diffstat (limited to 'lib')
-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'); |