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

Closing task module from Bot (back-end, nodeJS) #5641

Closed atymic closed 1 year ago

atymic commented 2 years ago

See; https://github.com/MicrosoftDocs/msteams-docs/issues/832

Hi, It doesn't look like the docs have been updated, and the .net example uses inputs which are not in the node framework. How can i close the task model in nodejs?

ghost commented 2 years ago

Hi atymic! 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

sayali-MSFT commented 2 years ago

@atymic -We are looking into this I will get back to you soon.

sayali-MSFT commented 2 years ago

@atymic -Please have a look at this doc- Here is sample in Node JS Teams Task module-https://github.com/microsoft/BotBuilder-Samples/tree/main/samples/javascript_nodejs/54.teams-task-module

Could you please elaborate the requirement which needs to be change in document?

atymic commented 2 years ago

@sayali-MSFT

As per the previous document, how can we close a task module submit without sending a card in the response? The example you linked send a message which is displayed in the dialog

https://github.com/microsoft/BotBuilder-Samples/blob/main/samples/javascript_nodejs/54.teams-task-module/bots/teamsTaskModuleBot.js#L71-L77

This is the same issue as this ticket, just I am using node https://github.com/MicrosoftDocs/msteams-docs/issues/832

sayali-MSFT commented 2 years ago

@atymic -You can refer this -https://github.com/OfficeDev/Microsoft-Teams-Samples/blob/c173c0e7a316df7425db1d795713e46c00594632/samples/bot-sharepoint-file-viewer/nodejs/bots/dialogBot.js#L64 As per my understanding, If you wants to close task module without returning any response. I don't think it may be possible.

sayali-MSFT commented 2 years ago

@atymic -Could you please confirm if your issue has resolved with above suggestion or still looking for any help?

atymic commented 2 years ago

@sayali-MSFT it appears it is possible, see this comment: https://github.com/MicrosoftDocs/msteams-docs/issues/832#issuecomment-538038949

cc @vman @Wajeed-msft

sayali-MSFT commented 2 years ago

@atymic - We will try this scenario from our end and let you know the updates.

sayali-MSFT commented 2 years ago

@atymic - Could you please refer this sample -https://github.com/OfficeDev/Microsoft-Teams-Samples/blob/c173c0e7a316df7425db1d795713e46c00594632/samples/bot-sharepoint-file-viewer/nodejs/bots/dialogBot.js#L64

atymic commented 2 years ago

Returning null causes the error in the original post.

ChetanSharma-msft commented 2 years ago

@atymic - Please confirm whether your issue has resolved or still need any help?

atymic commented 2 years ago

No it's not resolved. See my comment above, we get an error if null is returned (as is the issue in the original post)

rajeshbal commented 2 years ago

Having same issue. As mentioned above returning null causing error the original task module. i.e it gives "Unable to reach app. Please try again." Comment says this is possible. But the nodejs document is not updated.

sayali-MSFT commented 2 years ago

Hello @atymic ,@rajeshbal-We have tried with the below code and It's working fine from our end. Task module closed without getting any error.

Microsoft Teams Version 1.5.00.30306 (64-bit)-E.

Also, if your issue is not resolve using below code, please share a short video or screenshots, so that we can investigate further from our end.

    async handleTeamsTaskModuleSubmit(context, taskModuleRequest) {

        await context.sendActivity(MessageFactory.text('handleTeamsTaskModuleSubmit: ' + JSON.stringify(taskModuleRequest.data)));       
        return null;
    }

https://user-images.githubusercontent.com/93527375/200259830-bd42cb4c-0917-4caa-93cf-96934887353f.mp4

ghost commented 2 years ago

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 3 days. It will be closed if no further activity occurs within 3 days of this comment.