In Microsoft Teams Bot, I am trying to close a Task Module popup window after a action.submit button click by sending an empty response by using
protected override async Task<TaskModuleResponse> OnTeamsTaskModuleSubmitAsync(ITurnContext<IInvokeActivity> turnContext, TaskModuleRequest taskModuleRequest, CancellationToken cancellationToken)
{
var reply = MessageFactory.Text(JsonConvert.SerializeObject(taskModuleRequest));
await turnContext.SendActivityAsync(reply, cancellationToken);
return TaskModuleResponseFactory.CreateResponse("");
}
However this code suddenly stopped working recently. Any other alternate option to close the task module window
In C# you can close the task module using below code-
In NodeJs-
Reference Video- https://github.com/OfficeDev/microsoft-teams-library-js/assets/93527375/dc62874e-b5ed-4330-97f5-e3dbf7e46639
Sample Link-https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/bot-task-module/csharp