Can we disable Adaptive card button to single click in direct line channel

Brass Contributor

I want to limit the adaptive card button click to once in direct line channel. I have already tried UpdateActivityAsync but its throwing error 'methodnotvalid' as it is direct line channel.

 

Is any other possible way to disable button in direct line 

6 Replies
We are looking into this, we will get back to you.

@Lakshmi_145 - Could you please share the repro steps/document that you are following? Could you please let us know how you are calling UpdateActivityAsync in Direct line channel?

@Lakshmi_145 - Could you please share the repro steps/document that you are following? Could you please let us know how you are calling UpdateActivityAsync in Direct line channel?

@Meghana-MSFT 

 

I have used the below code to update the adaptive card while running the application. 

 

IMessageActivity messageActivity = Activity.CreateMessageActivity();
messageActivity.Attachments = new List<Attachment>
{
UserCardFactory.GetUserAuthenticateConfirmationCard(turnContext.Activity, false)
};
messageActivity.Id = connection.ActivityId;

await turnContext.UpdateActivityAsync(messageActivity);

 

While trying this code I got the exception " Operation returned an invalid status code 'MethodNotAllowed' "  

@Lakshmi_145 - Currently it is not possible to alter the card once it is sent to the client when the message is rendered in Webchat. As Webchat does not support updateActivity.

 

Thanks, 

Meghana

---------------------------------------------------------------------------------------------------------- 

If the response is helpful, please click "**Mark as Best Response**" and like it. You can share your feedback via Microsoft Teams Developer Feedback link. Click here to escalate.