better error handling of banlist checks on room join
This commit is contained in:
@@ -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
|
||||||
|
|
||||||
|
try:
|
||||||
on_banlist = await self.check_if_banned(evt.sender)
|
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
|
||||||
|
|||||||
Reference in New Issue
Block a user