From ffff6d1fa39d967c07861e82039059878b948b09 Mon Sep 17 00:00:00 2001 From: Hermes Agent Date: Fri, 19 Jun 2026 17:37:03 +0200 Subject: [PATCH] faq-trigger: auch in /api/chat (Website-Chat) einbauen --- app.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/app.py b/app.py index 3408538..637c47f 100644 --- a/app.py +++ b/app.py @@ -3573,6 +3573,21 @@ def api_chat(): if not user_message: return jsonify({'reply': 'Leere Nachricht. Was möchtest du wissen?'}) + # ── FAQ-Trigger: "Keine Antwort" / "Warum keine Nachricht" ────── + faq_keywords = [ + "keine antwort", "bekomme keine", "keine nachricht", + "antwort kommt nicht", "warum keine", "keine rückmeldung", + "why no reply", "not receiving", "save contact", "nummer speichern" + ] + if any(kw in user_message.lower() for kw in faq_keywords): + return jsonify({'reply': ( + "💡 *Tipp:* Damit unsere Antworten bei dir ankommen, " + "speichere bitte unsere Nummer in deinem Adressbuch. " + "WhatsApp filtert Nachrichten von unbekannten Business-Accounts " + "auf manchen Handys leider automatisch heraus.\n\n" + "Sobald du uns als Kontakt gespeichert hast, klappt's! ✅" + )}) + # Build context from published submissions rows = db.execute( "SELECT id, halle, content, summary, type, sender_name, category, "