|
@ -55,7 +55,7 @@ class Engine { |
|
|
|
|
|
|
|
|
/* Bind Message Parsing */ |
|
|
/* Bind Message Parsing */ |
|
|
let engine = this; |
|
|
let engine = this; |
|
|
let handleMessages = (event, room, toStartOfTimeline) => { |
|
|
|
|
|
|
|
|
let handleEvent = (event, room, toStartOfTimeline) => { |
|
|
/* Don't process messages from self */ |
|
|
/* Don't process messages from self */ |
|
|
if (event.sender.userId !== this.config.userId) { |
|
|
if (event.sender.userId !== this.config.userId) { |
|
|
/* don't process messages that aren't of type m.room.message */ |
|
|
/* don't process messages that aren't of type m.room.message */ |
|
@ -80,7 +80,7 @@ class Engine { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
this.bot.init(handleMessages); |
|
|
|
|
|
|
|
|
this.bot.init(handleEvent); |
|
|
|
|
|
|
|
|
/* Capture Exit Conditions */ |
|
|
/* Capture Exit Conditions */ |
|
|
|
|
|
|
|
|