From f568c0bc1a1bf2fdf244a16259a943a3db6b59bf Mon Sep 17 00:00:00 2001 From: hibobmaster <32976627+hibobmaster@users.noreply.github.com> Date: Sun, 7 Jul 2024 18:50:16 +0800 Subject: [PATCH] Fix runtime error --- src/bot.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/bot.py b/src/bot.py index 75c08f9..5a54570 100644 --- a/src/bot.py +++ b/src/bot.py @@ -250,8 +250,9 @@ class Bot: # message_callback RoomMessageText event async def message_callback(self, room: MatrixRoom, event: RoomMessageText) -> None: - if room.room_id not in self.whitelist_room_id: - return + if self.whitelist_room_id is not None: + if room.room_id not in self.whitelist_room_id: + return room_id = room.room_id # reply event_id