c# - Not able to disable previous adaptive card in teams for bot in .net - Stack Overflow

admin2025-04-15  1

Hi I am not able to disable previous adaptive card of bot in teams.i am using core with bot echo framework.

I have tried to pass activity id to form activity and make attachment null to pass to updateactivityasync function.

    var activity = new Microsoft.Bot.Schema.Activity
    {
        Id = selectedCategoryPromptdisabled, // Set the ID of the activity to update
        Conversation = turnContext.Activity.Conversation, // Set the conversation
        ServiceUrl = (turnContext.Activity.ServiceUrl !=null)? turnContext.Activity.ServiceUrl:"", 
        Type = ActivityTypes.Message, 
        Text = "Updated category information", 
        Attachments = null 
    };


    turnContext.UpdateActivityAsync(activity, cancellationToken);
转载请注明原文地址:http://www.anycun.com/QandA/1744717435a86648.html