botframework-sdk
botframework-sdk copied to clipboard
UpdateActivityAsync removes / overrides labels from messages
Github issues should be used for bugs and feature requests. Use Stack Overflow for general "how-to" questions.
Version
Bot Framework DotNet SDK 4.22.4
Describe the bug
If I create a new message activity and label it with "AI Generated" and "confidential," and then update this message again with UpdateActivityAsync in the second step, the labels "AI generated" and "Confidential" disappear.
The issue also occurs when the update activity has the same entities as it did during creation.
To Reproduce
Steps to reproduce the behavior:
Create a new message activity with the following code:
var activity = Activity.CreateMessageActivity();
activity.Text = "Insert text here";
activity.Entities.Add(new Entity("https://schema.org/Message") { Properties = JObject.FromObject(new { additionalType = new[] { "AIGeneratedContent" }, usageInfo = new { name = "Confidential", description = "Contains Sensitive Information" } }) });
var response = await context.SendActivityAsync(activity);
The message has the following labels:
Update the message with the following code:
var updateActivity = Activity.CreateMessageActivity();
updateActivity.Id = response.Id;
updateActivity.Text = "Insert text here (update)";
updateActivity.Entities.Add(new Entity("https://schema.org/Message") { Properties = JObject.FromObject(new { additionalType = new[] { "AIGeneratedContent" }, usageInfo = new { name = "Confidential", description = "Contains Sensitive Information" } }) });
await context.UpdateActivityAsync(updateActivity);
After updating, the message no longer has any labels - except of the "bearbeitet" (edited) one..:
Expected behavior
UpdateActivityAsync should not delete the labels.
Additional context
Add any other context about the problem here.
Tracking Status
Dotnet SDK TODO
- [ ] PR
- [ ] Merged
Javascript SDK TODO
- [ ] PR
- [ ] Merged
Python SDK TODO
- [ ] PR
- [ ] Merged
Java SDK TODO
- [ ] PR
- [ ] Merged
Samples TODO
- [ ] PR
- [ ] Merged
Docs TODO
- [ ] PR
- [ ] Merged
Tools TODO
- [ ] PR
- [ ] Merged