【发布时间】:2020-09-12 22:53:50
【问题描述】:
我正在使用机器人通过以下代码将带有单个附件(自适应卡片)的消息发布到团队频道。这工作正常。但是,在移动设备和 Teams 活动源中,发布卡片时通知中不会显示一些有用的文本,通知文本只是“卡片”(见下图)。
我已经尝试在卡片上设置fallbackText 参数,它不会调整通知中的文本。我还尝试在Activity 实例上设置text 参数,但这会导致错误提示它导致多个Skype 活动。我怎样才能使通知中显示的上下文与“卡片”不同?
card = CardFactory.adaptive_card({
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"type": "AdaptiveCard",
"version": "1.2",
"fallbackText": "This is some notification text",
"body": [ ... ]})
connector.conversations.create_conversation(ConversationParameters(
is_group=True,
channel_data={ "channel": { "id": "..." } },
activity=Activity(
type=ActivityTypes.message,
attachments=[card])))
【问题讨论】:
标签: botframework microsoft-teams