forked from ComputerTech/aprhodite
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
This commit is contained in:
parent
be3503b31b
commit
a0a96addb6
2
app.py
2
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})
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue