summaryrefslogtreecommitdiffstats
path: root/webapp/components/integrations
diff options
context:
space:
mode:
authorRyan Wang <R-Wang97@users.noreply.github.com>2016-08-24 08:55:01 -0700
committerenahum <nahumhbl@gmail.com>2016-08-24 12:55:01 -0300
commitec44df1b4824d88ff6bbe8c116085a590ce8461d (patch)
tree9b131e8fec58dcfb0c7733dde5c956af72a429be /webapp/components/integrations
parent23815a696c0cb6011c8288b29b9e01c55181c9ae (diff)
downloadchat-ec44df1b4824d88ff6bbe8c116085a590ce8461d.tar.gz
chat-ec44df1b4824d88ff6bbe8c116085a590ce8461d.tar.bz2
chat-ec44df1b4824d88ff6bbe8c116085a590ce8461d.zip
Trimmed beginning slash from command trigger word (#3866)
Diffstat (limited to 'webapp/components/integrations')
-rw-r--r--webapp/components/integrations/components/add_command.jsx7
1 files changed, 6 insertions, 1 deletions
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,