Forum Discussion
Getting a past activity's card attachment
- Feb 07, 2021
Hi voonsionglum, To retrieve the actual card body of a previous activity, there is no direct way to achieve it. Rather, you can try using messageID/ Conversation ID (we get in TurnContext object), build the conversation reference and save it in Azure Table Storage or Azure Blob Storage and update the previously posted card using updateActivityAsync method.
Hi voonsionglum, yes it is possible to retrieve the ID of the past activity conversation and can also update the activity using UpdateActivityAsync method. Could you please have a look at this sample code.
Mallipriya_MSFT Thanks for the response. We want to retrieve the actual card body of a previous activity. With a given activity Id, do you know if we can get the content that was sent for that activity? We would like to be able to amend the content of a previous activity (especially when the activity is sending a card) so that we can add in error messages if something went wrong with the bot.
It would be like how cards show the "Unable to reach app" red text message on adaptive cards when submit actions for cards are unable to complete when the corresponding web app is down.
- Mallipriya_MSFTFeb 07, 2021Former Employee
Hi voonsionglum, To retrieve the actual card body of a previous activity, there is no direct way to achieve it. Rather, you can try using messageID/ Conversation ID (we get in TurnContext object), build the conversation reference and save it in Azure Table Storage or Azure Blob Storage and update the previously posted card using updateActivityAsync method.