diff --git a/app.py b/app.py index 59d11f5..da8c8ed 100644 --- a/app.py +++ b/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)