Rakesh5594
Rakesh5594

Reputation: 51

MS Bot to Teams Integration issue

We have integrated a bot created in Microsoft Botframeowrk with MS Teams (by publising the channel and adding using App ID). On every message that is sent from Teams to the bot, we are getting an error in the channel logs: "activity must include non empty 'text' field or at least 1 attachment". From the console logs, we think that the error is caused by sendActivities being called twice and the second time activity.text field is sent empty which is causing this error. It does not occur in the Web Chat bot.

Upvotes: 2

Views: 1559

Answers (1)

Simon
Simon

Reputation: 65

I've faced the same problem. It first started appearing when I was sending multiple messages in one turn. Also, it only occurs when the message is sent from Teams, not if I test it via the Emulator or the WebChat.

To me it seems like this error doesn't affect the bots behavior as long as the part, where the error occurs (so TurnContext.sendActivity) is after the bots logic is handled.

So it isn't a solution, more like a workaround but if you are able to: just move the sendActivity to the very bottom of your logic, so it gets called in the end.

Upvotes: 0

Related Questions