Upload main.py
Browse files
main.py
CHANGED
|
@@ -186,10 +186,15 @@ async def receive_update(req: Request):
|
|
| 186 |
# 5) echo preview to the user
|
| 187 |
return JSONResponse({"status": "image_preview_sent", "preview": preview})
|
| 188 |
|
| 189 |
-
# TEXT:
|
| 190 |
if msg["type"] == "text":
|
| 191 |
-
|
| 192 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 193 |
|
| 194 |
# OTHER: ignore
|
| 195 |
return JSONResponse({"status": "ignored", "type": msg["type"]})
|
|
|
|
| 186 |
# 5) echo preview to the user
|
| 187 |
return JSONResponse({"status": "image_preview_sent", "preview": preview})
|
| 188 |
|
| 189 |
+
# TEXT: instruct user how to pick/send an ID image
|
| 190 |
if msg["type"] == "text":
|
| 191 |
+
send_whatsapp_message(
|
| 192 |
+
wa_id,
|
| 193 |
+
"Welcome to RUMAS! 📋\n\n"
|
| 194 |
+
"Please tap the 📎 (attachment) icon below, select \"Photo & Video Library,\" "
|
| 195 |
+
"and choose a clear image of your South African ID."
|
| 196 |
+
)
|
| 197 |
+
return JSONResponse({"status": "instructions_sent"})
|
| 198 |
|
| 199 |
# OTHER: ignore
|
| 200 |
return JSONResponse({"status": "ignored", "type": msg["type"]})
|