From ec44df1b4824d88ff6bbe8c116085a590ce8461d Mon Sep 17 00:00:00 2001 From: Ryan Wang Date: Wed, 24 Aug 2016 08:55:01 -0700 Subject: Trimmed beginning slash from command trigger word (#3866) --- webapp/components/integrations/components/add_command.jsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'webapp/components/integrations') diff --git a/webapp/components/integrations/components/add_command.jsx b/webapp/components/integrations/components/add_command.jsx index 55fe9e121..d71fb7c3f 100644 --- a/webapp/components/integrations/components/add_command.jsx +++ b/webapp/components/integrations/components/add_command.jsx @@ -69,10 +69,15 @@ export default class AddCommand extends React.Component { clientError: '' }); + let triggerWord = this.state.trigger.trim().toLowerCase(); + if (triggerWord.indexOf('/') === 0) { + triggerWord = triggerWord.substr(1); + } + const command = { display_name: this.state.displayName, description: this.state.description, - trigger: this.state.trigger.trim().toLowerCase(), + trigger: triggerWord, url: this.state.url.trim(), method: this.state.method, username: this.state.username, -- cgit v1.2.3-1-g7c22