avoid verifying someone if they left the room
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user