Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slash commands are passing the first command as an argument #1216

Closed
wreiske opened this issue Sep 23, 2019 · 0 comments · Fixed by #1223
Closed

Slash commands are passing the first command as an argument #1216

wreiske opened this issue Sep 23, 2019 · 0 comments · Fixed by #1223

Comments

@wreiske
Copy link
Contributor

wreiske commented Sep 23, 2019

  • 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

Screenshot_20190923-111317

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".

https://github.com/wreiske/Rocket.Chat.App-WebEx/blob/cd2712b1e6c28d706af2006f3b8e75ba093f7c16/commands/WebExCommand.ts#L17-L23

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant