Aug 16 2022 09:45 PM
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
Aug 17 2022 12:09 AM
Aug 17 2022 08:17 PM
Aug 18 2022 12:14 AM - edited Aug 23 2022 01:27 AM
@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?
Aug 25 2022 04:45 AM
Aug 25 2022 10:43 AM
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' "
Aug 26 2022 08:47 AM
@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.