- self._log(logging.INFO, "Not yet a room member")
-
- was_invited = False
- for room_id, room in client.invited_rooms.items():
- if room.display_name == self._room_name:
- was_invited = True
- self._log(logging.INFO, "Joining room")
- await client.join(room_id)
- break
-
- if not was_invited:
- self._log(logging.INFO, "Got no room invite yet")
+ if self._joined_room_id != None:
+ if self._joined_room_id != prior_joined_room_id:
+ self._log(logging.INFO, "Joined room")
+ else:
+ if self._joined_room_id != prior_joined_room_id:
+ self._log(logging.INFO, "Got kicked out of room?")
+ else:
+ self._log(logging.INFO, "Not yet a room member")
+ was_invited = False
+ for room_id, room in client.invited_rooms.items():
+ if room.display_name == self._room_name:
+ was_invited = True
+ self._log(logging.INFO, "Joining room")
+ await client.join(room_id)
+ break
+ if not was_invited:
+ self._log(logging.INFO, "Got no room invite yet")