better error handling of banlist checks on room join

This commit is contained in:
William Kray
2025-06-17 15:53:56 -07:00
parent 5166515a7c
commit 9c5570f58c
+5 -1
View File
@@ -823,7 +823,11 @@ class CommunityBot(Plugin):
if evt.room_id not in space_rooms: if evt.room_id not in space_rooms:
return return
on_banlist = await self.check_if_banned(evt.sender) try:
on_banlist = await self.check_if_banned(evt.sender)
except Exception as e:
self.log.error(f"Failed to check if {evt.sender} is banned: {e}")
on_banlist = False
if on_banlist: if on_banlist:
await self.ban_this_user(evt.sender) await self.ban_this_user(evt.sender)
return return