I am working on MS Bot Framework App.I want to know how many peoples are coming from specific channels like via webchat, DirectLine, etc. I want to maintain a log of this. How to can I get channel name from context?
You can use the following code to get the channel type:
context.Activity.ChannelId
For example, if it is "telegram", you've gotten the message from the "telegram".
If someone from Node.js needs this information too, channel name is stored in, as far as I know:
session.message.address.channelId
and in:
session.message.source
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With