minor fix

pull/215/head
Aevann 2023-10-07 13:57:14 +03:00
parent ef800cf652
commit 3d5734a8e7
1 changed files with 5 additions and 4 deletions

View File

@ -230,11 +230,12 @@ def connect(v):
@socketio.on('disconnect')
@auth_required_socketio
def disconnect(v):
for dictionary in online.values():
dictionary.pop(v.id, None)
if g.referrer != f'{SITE_FULL}/notifications/messages':
for dictionary in online.values():
dictionary.pop(v.id, None)
if v.username in typing[g.referrer]:
typing[g.referrer].remove(v.username)
if v.username in typing[g.referrer]:
typing[g.referrer].remove(v.username)
if not g.referrer:
return '', 400