diff --git a/index.js b/index.js index 96a849e..85d1dc7 100644 --- a/index.js +++ b/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;