Reputation: 137
I am developing a bot with Microsoft BotFramework and currently using it in Microsoft Teams.
When bot sends an adaptive card, Microsoft Teams notification text is always the same, "Bir kart gönder" in Turkish language, and English translation is probably "Sent a card".
Is there any way to modify this text?
Some notifications are important and should be taken care immediately, and some are not. If i may change the notification text, my users won't have to open the conversation to see notification for all messages.
Upvotes: 4
Views: 1680
Reputation: 76
var response = MessageFactory.Text(string.Empty);
response.Attachments.Add(cardAttachment);
response.Summary = "showing custom greeeting from the Bot - rather than a card";
await turnContext.SendActivityAsync(response, cancellationToken);
//once we add a summary Bot will not show "sent a card" message in teams and even in the notification we'll not see "sent a card", we'll get a summary.
Upvotes: 4
Reputation: 61
You can add a text message:
const activity = {
attachments: [adaptiveCard],
text: "your message"
};
The ugly thing with this solution is, that the user gets two notifications: one with the message and one with "Sent a card"
Upvotes: 2
Reputation: 2124
Currently, the default notification that appears when a bot sends a message is "[BotName] sent a card" It is not possible to change this message. However, if your bot sends a normal text message you can add a notification message to it.
Upvotes: 0