MicrosoftDocs / msteams-docs

Source for the Microsoft Teams developer platform documentation.
https://aka.ms/teamsdev
Creative Commons Attribution 4.0 International
281 stars 502 forks source link

When we use updateactivity method, "AI generated" is not displaying #11435

Open SubbaReddi opened 1 month ago

SubbaReddi commented 1 month ago

Type of issue

Missing information

Feedback

When send message using SendActivityAsync, we see "AI generated" label as shown in below screenshot. image

But if we update message using UpdateActivityAsync, label is not displaying. image

As it is known behavior for now, adding note will help.

Page URL

https://learn.microsoft.com/en-us/microsoftteams/platform/bots/how-to/bot-messages-ai-generated-content?tabs=before%2Cbotmessage

Content source URL

https://github.com/MicrosoftDocs/msteams-docs/blob/main/msteams-platform/bots/how-to/bot-messages-ai-generated-content.md

Author

@surbhigupta

Document Id

605a8486-6e6a-31d5-e8a1-021691206099

Nivedipa-MSFT commented 1 month ago

@surbhigupta12 - Could you please help here to add a note in document?

pedrojlazevedo commented 3 weeks ago

Hello all, this is happening to me too.

My attemps were:

                                    await context.updateActivity({
                                        id: activityId,
                                        type: 'message',
                                        attachments: [adaptiveCard],
                                        entities: [
                                            {
                                                type: "https://schema.org/Message",
                                                "@type": "Message",
                                                "@context": "https://schema.org",
                                                additionalType: ["AIGeneratedContent"],
                                            }
                                        ]
                                    });

And also:

const newActivity = MessageFactory.attachment(CardFactory.adaptiveCard(newAdaptiveCard));
                                newActivity.entities = [
                                    {
                                        type: "https://schema.org/Message",
                                        "@type": "Message",
                                        "@context": "https://schema.org",
                                        additionalType: ["AIGeneratedContent"],
                                    }
                                ]
                                newActivity.id = activityId;
                                await context.updateActivity(newActivity);

Is this an expected behaviour? Is the "Edited" message replacing the AI Content Generator tag?

Thank you in advance.

Nivedipa-MSFT commented 3 weeks ago

@pedrojlazevedo - Yes, this was the expected behavior. We will add a note in the document.

@v-ramyas5 - Could you please help here to add a note in document?

v-ramyas5 commented 3 weeks ago

Hello @Nivedipa-MSFT, we are working on the PR. Will update once the PR is merged into live.