Client remove_member(): room item may not exist

This commit is contained in:
miruka 2020-07-11 18:47:28 -04:00
parent 58e7321941
commit 7227ac04a3

View File

@ -1730,7 +1730,10 @@ class MatrixClient(nio.AsyncClient):
self.models[self.user_id, room.room_id, "members"].pop(user_id, None)
HTML.rooms_user_id_names[room.room_id].pop(user_id, None)
self.models[self.user_id, "rooms"][room.room_id].unverified_devices = \
room_item = self.models[self.user_id, "rooms"].get(room.room_id)
if room_item:
room_item.unverified_devices = \
self.room_contains_unverified(room.room_id)