|
|
|
@ -80,14 +80,14 @@ matrixclient.on('Room.timeline', function(event, room, resettimeline) {
|
|
|
|
|
|
|
|
|
|
let body = event.getContent().body;
|
|
|
|
|
|
|
|
|
|
let bang = body.match(/^\!([a-zA-Z]*)/);
|
|
|
|
|
if(bang === null) {
|
|
|
|
|
let project = body.match(/^\!([a-zA-Z]*)/);
|
|
|
|
|
if(project === null) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
bang = bang[1];
|
|
|
|
|
project = project[1];
|
|
|
|
|
|
|
|
|
|
if(commands[bang] !== undefined) {
|
|
|
|
|
let command = commands[bang];
|
|
|
|
|
if(commands[project] !== undefined) {
|
|
|
|
|
let command = commands[project];
|
|
|
|
|
|
|
|
|
|
let args = body.match(command['regex']);
|
|
|
|
|
if(args === null) {
|
|
|
|
|