Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -632,13 +632,18 @@ def callback():
|
|
| 632 |
)
|
| 633 |
bubbles.append(bubble)
|
| 634 |
|
| 635 |
-
|
| 636 |
-
|
| 637 |
-
|
| 638 |
-
|
| 639 |
-
|
| 640 |
-
|
| 641 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 642 |
|
| 643 |
reply_request = ReplyMessageRequest(
|
| 644 |
reply_token=event.reply_token,
|
|
|
|
| 632 |
)
|
| 633 |
bubbles.append(bubble)
|
| 634 |
|
| 635 |
+
bubbles_dict = []
|
| 636 |
+
for bubble in bubbles:
|
| 637 |
+
if hasattr(bubble, "as_json_dict"):
|
| 638 |
+
bubbles_dict.append(bubble.as_json_dict())
|
| 639 |
+
else:
|
| 640 |
+
bubbles_dict.append(bubble)
|
| 641 |
+
flex_message = FlexMessage(
|
| 642 |
+
alt_text="附近藥局推薦",
|
| 643 |
+
contents={
|
| 644 |
+
"type": "carousel",
|
| 645 |
+
"contents": bubbles_dict
|
| 646 |
+
)
|
| 647 |
|
| 648 |
reply_request = ReplyMessageRequest(
|
| 649 |
reply_token=event.reply_token,
|