chatbot-faq: Nummer-speichern-Hinweis in Willkommenstext + FAQ-Trigger für keine-Antwort-Fragen
This commit is contained in:
@@ -1099,6 +1099,27 @@ def whatsapp_webhook():
|
||||
pass
|
||||
continue
|
||||
|
||||
# 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 msg_type == "text" and any(kw in content.lower() for kw in faq_keywords):
|
||||
if META_TOKEN:
|
||||
try:
|
||||
send_whatsapp_message(
|
||||
sender_id,
|
||||
"💡 *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! ✅"
|
||||
)
|
||||
except Exception:
|
||||
pass
|
||||
continue
|
||||
|
||||
# Check for existing thread from this sender (5-min window)
|
||||
recent = db.execute(
|
||||
"""SELECT id, content, media_path, halle FROM submissions
|
||||
@@ -1196,6 +1217,8 @@ def whatsapp_webhook():
|
||||
f"✍️ Nenn uns deinen Vornamen, wenn du magst — das ist deine Einwilligung, "
|
||||
f"dass wir dich als Quelle nennen, falls wir deinen Beitrag verwenden. "
|
||||
f"Ohne Namen schreiben wir „anonyme Quelle\".\n\n"
|
||||
f"💡 Speicher unsere Nummer im Adressbuch, "
|
||||
f"damit unsere Antworten sicher ankommen.\n\n"
|
||||
f"🔒 „Meine Daten löschen\" genügt — und alles ist sofort und vollständig weg."
|
||||
)
|
||||
send_whatsapp_message(sender_id, reply)
|
||||
|
||||
Reference in New Issue
Block a user