2
votes

In my bot i have an adaptive card with submit button. Can i modify card or disable button or delete this card on submit action ?

1
Would be good to share more details of your code and examples of the issue, but I believe I understand. You are saying that after the adaptive card is used (clicked on or whatever) you want it to go away so a user can't scroll back up and hit a button again? I don't know how to do that but I am interested in a solution as I can see how that could cause issues with your dialog flow.billoverton
Hi Andrii Have you managed to do it? Because I only get 400 error when I try to execute UpdateActivityKostya Vyrodov

1 Answers

2
votes

In Teams you have the option of updating your card message. So you can use something like:

var newActivity = MessageFactory.Attachment(myUpdatedCard);
newActivity.Id = activityId //the Id of the original activity you sent;
await turnContext.UpdateActivityAsync(newActivity, cancellationToken);

To send a new version of the card.