[FIX] Regex on run slash command (#1223)
This commit is contained in:
parent
0ff47f477a
commit
58389dfdca
|
@ -620,7 +620,7 @@ class MessageBox extends Component {
|
||||||
).fetch();
|
).fetch();
|
||||||
if (slashCommand.length > 0) {
|
if (slashCommand.length > 0) {
|
||||||
try {
|
try {
|
||||||
const messageWithoutCommand = message.substr(message.indexOf(' ') + 1);
|
const messageWithoutCommand = message.replace(/([^\s]+)/, '').trim();
|
||||||
RocketChat.runSlashCommand(command, roomId, messageWithoutCommand);
|
RocketChat.runSlashCommand(command, roomId, messageWithoutCommand);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
log(e);
|
log(e);
|
||||||
|
|
Loading…
Reference in New Issue