Upload main.py
Browse files
main.py
CHANGED
|
@@ -123,11 +123,11 @@ def send_welcome_buttons(wa_id: str):
|
|
| 123 |
"buttons": [
|
| 124 |
{
|
| 125 |
"type": "reply",
|
| 126 |
-
"reply": {"id": "open_gallery", "title": "
|
| 127 |
},
|
| 128 |
{
|
| 129 |
"type": "reply",
|
| 130 |
-
"reply": {"id": "open_camera", "title": "
|
| 131 |
}
|
| 132 |
]
|
| 133 |
}
|
|
@@ -167,14 +167,14 @@ async def receive_update(req: Request):
|
|
| 167 |
if payload == "open_gallery":
|
| 168 |
send_whatsapp_message(
|
| 169 |
wa_id,
|
| 170 |
-
"π
|
| 171 |
)
|
| 172 |
elif payload == "open_camera":
|
| 173 |
send_whatsapp_message(
|
| 174 |
wa_id,
|
| 175 |
-
"πΈ
|
| 176 |
)
|
| 177 |
-
return JSONResponse({"status":
|
| 178 |
|
| 179 |
# TEXT: prompt with Quick-Reply buttons
|
| 180 |
if msg.get("type") == "text":
|
|
|
|
| 123 |
"buttons": [
|
| 124 |
{
|
| 125 |
"type": "reply",
|
| 126 |
+
"reply": {"id": "open_gallery", "title": "Tap π icon"}
|
| 127 |
},
|
| 128 |
{
|
| 129 |
"type": "reply",
|
| 130 |
+
"reply": {"id": "open_camera", "title": "Tap π· icon"}
|
| 131 |
}
|
| 132 |
]
|
| 133 |
}
|
|
|
|
| 167 |
if payload == "open_gallery":
|
| 168 |
send_whatsapp_message(
|
| 169 |
wa_id,
|
| 170 |
+
"π Please tap the π icon below and select \"Photo & Video Library\" to pick your ID image."
|
| 171 |
)
|
| 172 |
elif payload == "open_camera":
|
| 173 |
send_whatsapp_message(
|
| 174 |
wa_id,
|
| 175 |
+
"πΈ Please tap the π· icon next to the text box to take a photo of your ID now."
|
| 176 |
)
|
| 177 |
+
return JSONResponse({"status":"handled_button"})
|
| 178 |
|
| 179 |
# TEXT: prompt with Quick-Reply buttons
|
| 180 |
if msg.get("type") == "text":
|