MicrosoftDocs / msteams-docs

Source for the Microsoft Teams developer platform documentation.
https://aka.ms/teamsdev
Creative Commons Attribution 4.0 International
289 stars 513 forks source link

Responding with `type: "message"` to `task/fetch`activity result in empty task module #6740

Closed shubham-betterworks closed 2 years ago

shubham-betterworks commented 2 years ago
Screenshot 2022-08-23 at 5 10 30 PM

Response for /invoke API with activity type "task/fetch"

Screenshot 2022-08-23 at 5 10 26 PM

https://docs.microsoft.com/en-us/microsoftteams/platform/task-modules-and-cards/task-modules/task-modules-bots?tabs=nodejs

ghost commented 2 years ago

Hi shubham-betterworks! Thank you for bringing this issue to our attention. We will investigate and if we require further information we will reach out in one business day. Please use this link to escalate if you don't get replies.

Best regards, Teams Platform

ChetanSharma-msft commented 2 years ago

Hello @shubham-betterworks - Hope you are preparing and returning proper Task Module response like below: image

Submit handler response: image

Please refer below sample code: https://github.com/microsoft/BotBuilder-Samples/blob/main/samples/javascript_nodejs/54.teams-task-module/bots/teamsTaskModuleBot.js

shubham-betterworks commented 2 years ago

Hi @ChetanSharma-msft, yes I'm returning a proper TaskModule response

To reproduce the issue you can just change the return statement in handleTeamsTaskModuleFetch to return TaskModuleResponseFactory.toTaskModuleResponse('invoke message'); and try invoking the TaskModule from the bot. It will result in an empty Task Module.

Screenshot 2022-08-24 at 10 46 29 AM
ChetanSharma-msft commented 2 years ago

Hello @shubham-betterworks - Task modules permit you to create modal pop-up experiences in your Teams application. In the pop-up, you can:

  1. Run your own custom HTML or JavaScript code.
  2. Show an