Merge branch 'master' into room_persistence

This commit is contained in:
Etoh 2021-12-08 13:34:41 +00:00 committed by GitHub
commit 527c2a6c48
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -85,6 +85,7 @@ Enables room persistence. Path is to where a database file should be loaded/crea
.B \-\-permanent\-rooms-file [directory]
Specifies a list of rooms that will still be listed even if their playlist is empty. Path is to where a text file with one room per line. This will require persistent rooms to be enabled.
.TP
.B \-\-max\-chat\-message\-length [maxChatMessageLength]
Maximum number of characters in one chat message (default is 150).

View File

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