|
|
|
|
@ -187,17 +187,17 @@ class @ChatMessages |
|
|
|
|
Meteor.call 'slashCommand', {cmd: command, params: param, msg: msgObject } |
|
|
|
|
return |
|
|
|
|
|
|
|
|
|
if !RocketChat.settings.get('Message_AllowUnrecognizedSlashCommand') |
|
|
|
|
invalidCommandMsg = |
|
|
|
|
_id: Random.id() |
|
|
|
|
rid: rid |
|
|
|
|
ts: new Date |
|
|
|
|
msg: TAPi18n.__('No_such_command', { command: match[1] }) |
|
|
|
|
u: |
|
|
|
|
username: "rocketbot" |
|
|
|
|
private: true |
|
|
|
|
ChatMessage.upsert { _id: invalidCommandMsg._id }, invalidCommandMsg |
|
|
|
|
return |
|
|
|
|
if !RocketChat.settings.get('Message_AllowUnrecognizedSlashCommand') |
|
|
|
|
invalidCommandMsg = |
|
|
|
|
_id: Random.id() |
|
|
|
|
rid: rid |
|
|
|
|
ts: new Date |
|
|
|
|
msg: TAPi18n.__('No_such_command', { command: match[1] }) |
|
|
|
|
u: |
|
|
|
|
username: "rocketbot" |
|
|
|
|
private: true |
|
|
|
|
ChatMessage.upsert { _id: invalidCommandMsg._id }, invalidCommandMsg |
|
|
|
|
return |
|
|
|
|
|
|
|
|
|
Meteor.call 'sendMessage', msgObject |
|
|
|
|
done() |
|
|
|
|
|