From 4e3583ef9a8d444ea69353f6cf0b39937ccfd303 Mon Sep 17 00:00:00 2001 From: 3nd3r Date: Sun, 12 Apr 2026 14:50:31 -0500 Subject: [PATCH] Violet replies to unregistered guests with friendly signup prompt Instead of a silent error event, guests who PM Violet now see their message echoed back plus a flirty reply telling them to register. --- app.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/app.py b/app.py index 01d255d..136280a 100644 --- a/app.py +++ b/app.py @@ -690,7 +690,16 @@ def on_pm_message(data): # Route to AI if recipient is Violet if room.endswith(f":{AI_BOT_NAME.lower()}"): if not user.get("user_id") and not user.get("is_admin"): - emit("error", {"msg": "You must be registered to chat with Violet."}); return + # Echo their message, then reply as Violet + emit("pm_message", payload, to=sid) + emit("pm_message", { + "from": AI_BOT_NAME, + "text": "Hey hun 💜 You'll need to register an account before we can chat. " + "Go back and sign up — I'll be waiting for you! 😘", + "room": room, + "ts": _ts(), + }, to=sid) + return if not user.get("has_ai_access") and user.get("ai_messages_used", 0) >= AI_FREE_LIMIT: emit("ai_response", {"error": "ai_limit_reached", "room": room}, to=sid) return