Trimmed beginning slash from command trigger word (#3866)

Этот коммит содержится в:
Ryan Wang
2016-08-24 08:55:01 -07:00
коммит произвёл enahum
родитель 23815a696c
Коммит ec44df1b48

Просмотреть файл

@@ -69,10 +69,15 @@ export default class AddCommand extends React.Component {
clientError: '' clientError: ''
}); });
let triggerWord = this.state.trigger.trim().toLowerCase();
if (triggerWord.indexOf('/') === 0) {
triggerWord = triggerWord.substr(1);
}
const command = { const command = {
display_name: this.state.displayName, display_name: this.state.displayName,
description: this.state.description, description: this.state.description,
trigger: this.state.trigger.trim().toLowerCase(), trigger: triggerWord,
url: this.state.url.trim(), url: this.state.url.trim(),
method: this.state.method, method: this.state.method,
username: this.state.username, username: this.state.username,