botframework-sdk icon indicating copy to clipboard operation
botframework-sdk copied to clipboard

bot.on('message' is not working

Open MiroValchev opened this issue 10 years ago • 4 comments

bot.on('message' is not working.

Quite a simple bug:

https://github.com/Microsoft/BotBuilder/blob/7827c3f64395fbdb84277bb5870c5f6fa637c29d/Node/src/bots/TextBot.ts#L84

vs

https://github.com/Microsoft/BotBuilder/blob/2e846d283d21d152b53b058ec4de94c918dcb1d0/Node/src/bots/BotConnectorBot.ts#L268

type here is 'Message'

There's inconsistency in naming for events, i.e. some start with small letters and other with capital.

MiroValchev avatar Jun 06 '16 13:06 MiroValchev

The bots map through the native events from the underlying services without modifying the case. So yes that's an issue but since every service is different not much we can do about that.

Stevenic avatar Jun 07 '16 07:06 Stevenic

I see. How about toLowerCase()? Would that be an improvement or not?

MiroValchev avatar Jun 07 '16 07:06 MiroValchev

But that kind of reverses the problem. If you read other docs that have the event names with proper casing and you sue that then your events don't work the other way and I have to say you should have lowercased it.

Let me look around at what other libraries do case wise for events and maybe i'll go the lowercase route.

Stevenic avatar Jun 10 '16 01:06 Stevenic

Closing this issue. Thanks!

v-thgratMSGit avatar Jul 25 '16 18:07 v-thgratMSGit