Spaces:
Sleeping
Sleeping
williamagyapong
commited on
Update main.py
Browse files
main.py
CHANGED
@@ -59,13 +59,14 @@ def messenger_button(recipient_phone, message, header='Transaction Confirmation'
|
|
59 |
)
|
60 |
|
61 |
def messenger_reply_button(recipient_phone, message, header = 'Transaction Confirmation'):
|
|
|
62 |
messenger.send_reply_button(
|
63 |
recipient_id=f"{recipient_phone}",
|
64 |
button={
|
65 |
# "header": f"{header}",
|
66 |
"type": "button",
|
67 |
"body": {
|
68 |
-
"text": f"{message}"
|
69 |
},
|
70 |
"action": {
|
71 |
"buttons": [
|
@@ -73,7 +74,7 @@ def messenger_reply_button(recipient_phone, message, header = 'Transaction Confi
|
|
73 |
"type": "reply",
|
74 |
"reply": {
|
75 |
"id": "confirm",
|
76 |
-
"title": "
|
77 |
}
|
78 |
},
|
79 |
{
|
@@ -223,7 +224,7 @@ def hook():
|
|
223 |
messenger.send_message(message=f"{response}", recipient_id=mobile)
|
224 |
else:
|
225 |
process_user_msg(message, mobile)
|
226 |
-
messenger.send_message(message=f"User message processed!", recipient_id=mobile)
|
227 |
|
228 |
elif message_type == "audio":
|
229 |
audio = messenger.get_audio(data)
|
|
|
59 |
)
|
60 |
|
61 |
def messenger_reply_button(recipient_phone, message, header = 'Transaction Confirmation'):
|
62 |
+
header_message = "*Please confirm the details below before we proceed*:\n\n"
|
63 |
messenger.send_reply_button(
|
64 |
recipient_id=f"{recipient_phone}",
|
65 |
button={
|
66 |
# "header": f"{header}",
|
67 |
"type": "button",
|
68 |
"body": {
|
69 |
+
"text": f"{header_message} {message}"
|
70 |
},
|
71 |
"action": {
|
72 |
"buttons": [
|
|
|
74 |
"type": "reply",
|
75 |
"reply": {
|
76 |
"id": "confirm",
|
77 |
+
"title": "Confirm"
|
78 |
}
|
79 |
},
|
80 |
{
|
|
|
224 |
messenger.send_message(message=f"{response}", recipient_id=mobile)
|
225 |
else:
|
226 |
process_user_msg(message, mobile)
|
227 |
+
# messenger.send_message(message=f"User message processed!", recipient_id=mobile)
|
228 |
|
229 |
elif message_type == "audio":
|
230 |
audio = messenger.get_audio(data)
|