Fix: guard Room.timeline handler against thread timeline events with no room object
This commit is contained in:
2
index.js
2
index.js
@@ -74,6 +74,8 @@ function loadQuotes() {
|
||||
|
||||
// Respond to messages in any room this bot is a member of.
|
||||
client.on('Room.timeline', (event, room) => {
|
||||
if (!room) return; // thread timeline events don't carry a room object
|
||||
|
||||
const type = event.getType();
|
||||
if (type !== 'm.room.message') return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user