Changing the "Posted a new message" notification

Copper Contributor

We have recently written some code that sends an adaptive card through to Teams.

 

When the adaptive card arrives at Teams, a desktop notification shows stating "ChatUser posted a new message".

 

I was wondering how to change the text of the notification? Can this be changed to show some other text from the adaptive card?

1 Reply

@Jon_Monks 
The default notification can be changed by adding summary to the code as below:

 

var response = MessageFactory.Text(string.Empty);
response.Attachments.Add(cardAttachment);
response.Summary = "Here goes your desired text";
await turnContext.SendActivityAsync(response, cancellationToken);

 

Thanks, 

Prasad Das

------------------------------------------------------------------------------------------------------------------------ 

If the response is helpful, please click "**Mark as Best Response**" and like it. You can share your feedback via Microsoft Teams Developer Feedback link. Click here to escalate.