Skip to content

Commit

Permalink
[FIX] Regex on run slash command (RocketChat#1223)
Browse files Browse the repository at this point in the history
  • Loading branch information
djorkaeffalexandre authored and diegolmello committed Sep 25, 2019
1 parent 0ff47f4 commit 58389df
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/containers/MessageBox/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 58389df

Please sign in to comment.