From a0a96addb6872584001e28c16c2a8b65a475f7c8 Mon Sep 17 00:00:00 2001 From: 3nd3r Date: Sun, 12 Apr 2026 12:51:55 -0500 Subject: [PATCH] Fix #4: Don't broadcast PM invite when target is Violet - Only emit pm_invite when target_sid exists (real user) - Violet has no socket session, so emitting to None would broadcast to all connected clients, leaking who is chatting with the AI --- app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.py b/app.py index e325ccf..b711536 100644 --- a/app.py +++ b/app.py @@ -530,7 +530,7 @@ def on_pm_open(data): join_room(room) if target_sid: pending_pm_invites.setdefault(target_sid, set()).add(room) - socketio.emit("pm_invite", {"from": user["username"], "room": room}, to=target_sid) + socketio.emit("pm_invite", {"from": user["username"], "room": room}, to=target_sid) emit("pm_ready", {"with": target, "room": room})