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