[Adaptive Cards] Delete message from context?
Is there any way that I can remove/delete the posted messages from context? I can't find any function that can delete the message.
Expected Behavior Once user click the button of adaptive card, I would like to remove the adaptive card. So, if I can remove the message, so I can remove the adaptive card.
@nwhitmont I would like to delete a message from context. Do you know how to delete a certain message I want? Adaptive Card is just an example, but if you have any idea of deleting a certain message, then I can use the same logic to delete adaptive card from the context
Hi @CalvinFengDatacom
What do you mean by "delete message from context"? Are you using the WebChat channel, and want to remove a message in the chat window after the user interacts with the Adaptive Card? Removing messages is not a built in feature of WebChat. You would need to fork the open source repository, and add support for this. Here is the WebChat repo: https://github.com/Microsoft/BotFramework-WebChat
Let me know if you have any questions.
Thanks @EricDahlvang
Your are right, I'm using WebChat channel for developing the bot ATM. I would like to remove a message in the chat window after user interacts with the adaptive card. This is my question, and I think you already give me the answer.
I will have a look the repository when I'm free.
So, any progress on this? I'd like to know how @CalvinFengDatacom managed to fix this issue.
@artus Unfortunately I don't think we can do it from out-of-box. So, what we just did is set a mark for each of the adaptive card, when the adaptive card has been submitted, it will be marked by using the state data. So, if user want to submit the same adaptive card again, then it will notice user that they have already submitted, you can do ABC or XYZ to redo your business logic/flow again.