Commit 58389dfd authored by Djorkaeff Alexandre's avatar Djorkaeff Alexandre Committed by Diego Mello
Browse files

[FIX] Regex on run slash command (#1223)

parent 0ff47f47
......@@ -620,7 +620,7 @@ class MessageBox extends Component {
).fetch();
if (slashCommand.length > 0) {
try {
const messageWithoutCommand = message.substr(message.indexOf(' ') + 1);
const messageWithoutCommand = message.replace(/([^\s]+)/, '').trim();
RocketChat.runSlashCommand(command, roomId, messageWithoutCommand);
} catch (e) {
log(e);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment