I am using a bot to post messages with a single attachment (an adaptive card) to a teams channel using the code below. This is working fine. However, on both mobile and the Teams activity feed, rather than some useful text being shown in the notification when a card is posted, the notification text is simply "Card" (see image below).
I have tried setting the fallbackText
parameter on the card, which doesn't adjust the text in the notification. I have also tried setting the text
parameter on the Activity
instance, but this results in an error saying it resulted in multiple Skype activities. How can I make it so the context displayed in the notification is something apart from just "Card"?
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])))