poprawkiA
This commit is contained in:
2
app.py
2
app.py
@ -834,6 +834,7 @@ def handle_edit_item(data):
|
||||
|
||||
@socketio.on('join_list')
|
||||
def handle_join(data):
|
||||
global active_users
|
||||
room = str(data['room'])
|
||||
username = data.get('username', 'Gość')
|
||||
join_room(room)
|
||||
@ -851,6 +852,7 @@ def handle_join(data):
|
||||
|
||||
@socketio.on('disconnect')
|
||||
def handle_disconnect():
|
||||
global active_users
|
||||
for room, users in active_users.items():
|
||||
if current_user.username in users:
|
||||
users.remove(current_user.username)
|
||||
|
Reference in New Issue
Block a user