Commit e9561f11 by Oleksandr Barabash

minor fixs

parent 053f64dd
...@@ -119,12 +119,12 @@ class TeamsMessagingExtensionsActionPreviewBot(TeamsActivityHandler): ...@@ -119,12 +119,12 @@ class TeamsMessagingExtensionsActionPreviewBot(TeamsActivityHandler):
# TODO(s1z): create parase for all card types # TODO(s1z): create parase for all card types
attachments = [CardFactory.adaptive_card(card)] attachments = [CardFactory.adaptive_card(card)]
activity = Activity( activity = Activity(type=ActivityTypes.message,
type=ActivityTypes.message, text=text, attachments=attachments)
text=text, if len(attachments) > 1:
attachments=attachments, activity.attachment_layout = (
attachment_layout=AttachmentLayoutTypes.carousel AttachmentLayoutTypes.carousel
) )
response = await turn_context.send_activity(activity) response = await turn_context.send_activity(activity)
if response: if response:
future.set_result(response) future.set_result(response)
......
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