avoid verifying someone if they left the room

This commit is contained in:
William Kray
2025-04-19 09:10:09 -07:00
parent afcab3b173
commit b22d760994
+5
View File
@@ -967,6 +967,11 @@ class CommunityBot(Plugin):
if user_phrase == expected_phrase:
try:
# confirm user is still in target room
members = await self.client.get_joined_members(state["target_room"])
if state["user"] not in members:
await self.client.send_notice(evt.room_id, "Looks like you've left the target room. Rejoin to try again.")
else:
# Update power levels in target room
power_levels = await self.client.get_state_event(
state["target_room"], EventType.ROOM_POWER_LEVELS