Open eoinobrien opened 11 months ago
Hi eoinobrien! 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
Hello @eoinobrien - Thanks for raising your query. We will look into it and let you know the updates.
Sorry for delay in response. We are looking into it and let you know the updates.
Update: @eoinobrien - We have investigated your issue and please find below result:
Steps followed: 1) Setup the sample: https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/bot-task-module/nodejs 2) Tested the functionality from Bot and Tab:
3) If we submit the data from Task Module with Adaptive Card via clicking on the submit button, it will call the bot method async handleTeamsTaskModuleSubmit(context, taskModuleRequest)
and later it will call the callback to submitHander
which is by design behaviour.
4) If we submit the data from Task Module with custom form, ideally it should call the submit handler
with object or string but it's working only if we are calling microsoftTeams.tasks.submitTask()
with empty value. (It should work with object or string as well)
In other cases (Passing object or string) it is actually calling the bot method async handleTeamsTaskModuleSubmit(context, taskModuleRequest)
even if we are not passing the botid.
So, looks like bot id is not compulsory to pass but this permits Teams to validate that the app sending the result is same as the invoked task module.
We will check below with engineering team:
1) Why submit handler is not calling for microsoftTeams.tasks.submitTask(customerInfo)
where it is currently calling bot method async handleTeamsTaskModuleSubmit(context, taskModuleRequest)
2) Why bot-id is compulsory to handle custom form related submitted data at bot method side, rather than calling submithandler
callback.
We will check with engineering team and let you know the updates.
We have raised the bug for it and informed engineering team. We will let you know the updates if we have any.
I'm looking at the docs and I'm not sure if I am confused or if there is a contradiction.
Near the top of the page it says:
But towards the bottom there is a section titled "Adaptive Card TaskInfo.card", which has the following code snippet:
Which seems to indicate that there is a "JavaScript submitHandler function to call when the user closes or presses a button on the Adaptive Card".
Which is correct?
Also I have used this submitHandler before without using a bot so can you explain why the docs say "app must include a bot to get any response from the user" or is that a bug that it is possible in the code.
Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.