microsoft / microsoft/teams.net
SuggestedActions is not visible if MessageActivity is updated
- Dominant language
- C#
- Stars
- 46
- Forks
- 21
- Avg merge
- 22h 25m
- Merged PRs (30d)
- 16
Description
Hi all,
I have an issue with suggestions after message is updated.
here is an sample example :
```
var messageActivity = new MessageActivity(messageText)
.WithSuggestedActions(
new SuggestedActions()
{
To = [activity.From.Id],
Actions = [
new Microsoft.Teams.Api.Cards.Action(ActionType.IMBack) {
Title = $"Execute",
Value = "test"
}
]
}).AddAIGenerated().AddFeedback();
var responseActivity = await client.Send(messageActivity );
//....
//....
//....
var updatedMessageActivity = new MessageActivity(updatedMessageText)
.WithSuggestedActions(
new SuggestedActions()
{
To = [activity.From.Id],
Actions = [
new Microsoft.Teams.Api.Cards.Action(ActionType.IMBack) {
Title = $"Execute",
Value = "test"
}
]
}).AddAIGenerated().AddFeedback();
updatedMessageActivity .Id = responseActivity.Id;
await client.Send(updatedMessageActivity );
```
Is this a bug or is there another way to update activities in Group Chat and keep suggestion visible, stream is not an option.
Thx in advance
Contributor guide
Research direction
Start with the MessageActivity and WithSuggestedActions calls in the report, then trace client.Send for initial creation versus ID-based update. Reproduce the group-chat update with the supplied C# example and verify whether suggested actions remain visible; done means the behavior is fixed or the supported limitation and alternative are documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- api
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 42/100