|
|
@ -13,13 +13,14 @@ class Engine { |
|
|
|
this.initModules(); |
|
|
|
|
|
|
|
/* Bind Message Parsing */ |
|
|
|
let handleMessages = function (event, room, toStartOfTimeline) { |
|
|
|
let handleMessages = (event, room, toStartOfTimeline) => { |
|
|
|
if (event.getType() !== "m.room.message") { |
|
|
|
logger.debug("Recieved message of type: %s", event.getType()); |
|
|
|
return; // only use messages
|
|
|
|
} |
|
|
|
} else { |
|
|
|
logger.debug("[%s] %s", room.name, event.event.content.body); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
this.bot.init(handleMessages); |
|
|
|
|
|
|
|