Commit 053f64dd by Oleksandr Barabash

attachment type added to activity response

parent 4becebf6
...@@ -116,14 +116,16 @@ class TeamsMessagingExtensionsActionPreviewBot(TeamsActivityHandler): ...@@ -116,14 +116,16 @@ class TeamsMessagingExtensionsActionPreviewBot(TeamsActivityHandler):
CardFactory.adaptive_card(x) for x in cards CardFactory.adaptive_card(x) for x in cards
] ]
elif card is not None: elif card is not None:
# TODO(s1z): create parase for all card types
attachments = [CardFactory.adaptive_card(card)] attachments = [CardFactory.adaptive_card(card)]
response = await turn_context.send_activity(Activity( activity = Activity(
type=(AttachmentLayoutTypes.carousel if cards else type=ActivityTypes.message,
ActivityTypes.message),
text=text, text=text,
attachments=attachments) attachments=attachments,
attachment_layout=AttachmentLayoutTypes.carousel
) )
response = await turn_context.send_activity(activity)
if response: if response:
future.set_result(response) future.set_result(response)
except Exception as exception: except Exception as exception:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment