Spaces:
Sleeping
Sleeping
williamagyapong
commited on
Update main.py
Browse files
main.py
CHANGED
@@ -167,7 +167,7 @@ def handle_interactive_response(mobile, button_id):
|
|
167 |
Handles the user's button response (Confirm or Cancel).
|
168 |
"""
|
169 |
doc_id = 'pending-user-action'
|
170 |
-
temp_ref = db.collection("users").document(
|
171 |
transaction = temp_ref.get()
|
172 |
|
173 |
if transaction.exists:
|
@@ -217,7 +217,7 @@ def hook():
|
|
217 |
if message_type == "text":
|
218 |
message = messenger.get_message(data)
|
219 |
# Handle greetings
|
220 |
-
if message.lower() in ("hi", "hello", "help", "how are you"):
|
221 |
response = "Hi there! My name is SmartLedger. How can I help you today?"
|
222 |
|
223 |
messenger.send_message(message=f"{response}", recipient_id=mobile)
|
|
|
167 |
Handles the user's button response (Confirm or Cancel).
|
168 |
"""
|
169 |
doc_id = 'pending-user-action'
|
170 |
+
temp_ref = db.collection("users").document(mobile).collection("temp_transactions").document(doc_id)
|
171 |
transaction = temp_ref.get()
|
172 |
|
173 |
if transaction.exists:
|
|
|
217 |
if message_type == "text":
|
218 |
message = messenger.get_message(data)
|
219 |
# Handle greetings
|
220 |
+
if message.lower() in ("hi", "hello", "hola", "help", "how are you"):
|
221 |
response = "Hi there! My name is SmartLedger. How can I help you today?"
|
222 |
|
223 |
messenger.send_message(message=f"{response}", recipient_id=mobile)
|