Open qinezh opened 2 months ago
SDK version: 4.22.1 Platform: Teams
I have created a Teams bot that supports:
Action.Execute
However, the card (step 2) reverted back to the previous one (step 1) after reacting to it. The issue occurs both in classic Teams and new Teams.
The adaptive cards won't be reverted after reactions.
https://github.com/microsoft/botbuilder-js/assets/15644078/495ced68-c6a1-4366-a1bb-7f07dcbb84de
Versions
SDK version: 4.22.1 Platform: Teams
Describe the bug
I have created a Teams bot that supports:
Action.Execute
action is executed.However, the card (step 2) reverted back to the previous one (step 1) after reacting to it. The issue occurs both in classic Teams and new Teams.
To Reproduce
Below's the test code with botbuilder SDK
```typescript import { ActivityTypes, CardFactory, MessageFactory, StatusCodes, TeamsActivityHandler, TurnContext, } from "botbuilder"; export class TeamsBot extends TeamsActivityHandler { constructor() { super(); this.onMessage(async (context, next) => { console.log("Running with Message Activity."); const card = CardFactory.adaptiveCard({ "type": "AdaptiveCard", "body": [ { "type": "TextBlock", "size": "Medium", "weight": "Bolder", "text": "Click button" }, { "type": "ActionSet", "actions": [ { "type": "Action.Execute", "verb": "doStuff", "title": "DoStuff" } ] } ], "$schema": "http://adaptivecards.io/schemas/adaptive-card.json", "version": "1.4" }); const message = MessageFactory.attachment(card) await context.sendActivity(message); await next(); }); this.onTurn(async (context: TurnContext, next: () => PromiseExpected behavior
The adaptive cards won't be reverted after reactions.
Screenshots
https://github.com/microsoft/botbuilder-js/assets/15644078/495ced68-c6a1-4366-a1bb-7f07dcbb84de