Changing the "Posted a new message" notification

%3CLINGO-SUB%20id%3D%22lingo-sub-2701794%22%20slang%3D%22en-US%22%3EChanging%20the%20%22Posted%20a%20new%20message%22%20notification%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2701794%22%20slang%3D%22en-US%22%3E%3CP%3EWe%20have%20recently%20written%20some%20code%20that%20sends%20an%20adaptive%20card%20through%20to%20Teams.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhen%20the%20adaptive%20card%20arrives%20at%20Teams%2C%20a%20desktop%20notification%20shows%20stating%20%22ChatUser%20posted%20a%20new%20message%22.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%20class%3D%22%22%3EI%20was%20wondering%20how%20to%20change%20the%20text%20of%20the%20notification%3F%20Can%20this%20be%20changed%20to%20show%20some%20other%20text%20from%20the%20adaptive%20card%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2701794%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3ENotification%20Issues%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EPop%20Up%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Occasional 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.