diff --git a/files/routes/chat.py b/files/routes/chat.py index bf2263cf2..1f9c89aff 100644 --- a/files/routes/chat.py +++ b/files/routes/chat.py @@ -243,7 +243,8 @@ def disconnect(v): online["messages"].remove(v.id) return '' - online[room].pop(v.id, None) + if online.get(room): + online[room].pop(v.id, None) if v.username in typing[room]: typing[room].remove(v.username)