Forum Discussion
MS Teams Bot Event Not Fired when message is sent from outside the Teams Bot
gagsbhatnagar - Out side the teams bot mean? How you are sending the message? Could you please explain your scenario in more detail?
- gagsbhatnagarDec 23, 2020Copper Contributor
Nikitha-MSFT I am trying to implement the following solution for managing a long running process in MS Teams Bot. However I am getting error while Event Activity Type message back to Bot from Azure Function.
https://docs.microsoft.com/en-us/azure/bot-service/bot-builder-howto-long-operations-guidance?view=azure-bot-service-4.0
When I send an Message Activity Type message back to Bot from Azure function no event get raised on the Bot side. I expected OnMessageActivityAsync or OnEventActivityAsync event handlers in DialogBot.cs to be raised when an Activity message gets sent from Azure Function.
I tried to send an Activity message to Bot from a sample windows application but still no events were triggered on the Bot side. On both occasions, the message send by Azure Function and sample Windows application appeared in the bot chat window.
Let me know if you need more information.
Thanks !
- Nikitha-MSFTDec 28, 2020Former Employee
gagsbhatnagar - when you use the message back functionality teams directly send the displaytext mentioned in the card. Are you not receiving the message?
- gagsbhatnagarDec 31, 2020Copper ContributorNikitha-MSFT I am receiving the message in teams. However, I need to capture the message received in my bot code so that I can process it. Please see the documentation - https://docs.microsoft.com/en-us/azure/bot-service/bot-builder-howto-long-operations-guidance?view=azure-bot-service-4.0
In the above documentation, protected override OnEventActivityAsync is supposed to be invoked when the message is received by the bot.