fix persistent rooms condition

This commit is contained in:
odrling 2021-12-10 15:27:14 +01:00
parent d60efabbad
commit 24e77521bc
No known key found for this signature in database
GPG Key ID: A0145F975F9F8B75

View File

@ -465,11 +465,11 @@ class RoomManager(object):
oldRoom = watcher.getRoom()
if oldRoom:
oldRoom.removeWatcher(watcher)
if self._roomsDir is None or oldRoom.isStale(self._timer):
if self._roomsDbFile is None:
self._deleteRoomIfEmpty(oldRoom)
def _getRoom(self, roomName):
if roomName in self._rooms and not self._rooms[roomName].isStale(self._timer):
if roomName in self._rooms:
return self._rooms[roomName]
else:
if RoomPasswordProvider.isControlledRoom(roomName):