fix persistent rooms condition (#492)

This commit is contained in:
Florian Badie 2021-12-11 09:03:27 +01:00 committed by GitHub
parent d60efabbad
commit 566f90b47f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

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):