wictorwilen/botbuilder-teams-messagingextensions

onTurn doesn't check if context.activity.value is defined before accessing context.activity.value.commandId

Closed this issue · 1 comments

I am encountering an error on line 117.

[onTurnError] unhandled error: TypeError: Cannot read property 'commandId' of undefined

In my situation context.activity.value is undefined. For background I'm using adapter.continueConversation, which seems to create an activity with name: continueConversation but no value.

If I change line 116 to

if (this.commandId !== undefined && context.activity.value !== undefined) {

everything works fine.

Happy to file a PR.

Thanks for finding this. I'd love to see a PR (to the preview branch please) and I'll get it merged and published as soon as possible