-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Slash commands are passing the first command as an argument #1216
Description
- Your Rocket.Chat Experimental app version: 1.20.0.11408
- Your Rocket.Chat server version: 2.0.0
- Device (or Simulator) you're running with: Note 10+ 5G
This has been an open issue on the Apps engine since October of 2018 and affected the native apps as well. Notice the url above shows /webex at the end of the URL.
RocketChat/Rocket.Chat.Apps-engine#69
wreiske/Rocket.Chat.App-WebEx#1
When using "username" from the apps engine, it should use the actual username, not the user's fullname. Also, when no slash command arguments are provided, there shouldn't be any arguments in the slash command's "arguments".
The context.getArguments() shouldn't have anything in them if the slash command was ran without any arguments. For some reason on the RN version, the first argument is always the slash command that ran. This is different than the desktop app that has no arguments (which is how it should work!)
Expected behavior:
/webex run by itself should return 0 arguments
/webex wreiske should return 1 argument, 'wreiske'
Actual Behavior:
For some reason /webex in the RN app is showing /webex run by itself as the first argument when there should be none.
