How to get channel name in Bot Framework

I am working on MS Bot Framework App.I want to know how many people are coming from certain channels like webchat, DirectLine, etc. I want to keep a journal of this. How can I get the name of the channel from the context?

+4


source to share


2 answers


You can use the following code to get the channel type:

context.Activity.ChannelId

      



For example, if it is a "telegram", you received a message from a "telegram".

+4


source


If someone from Node.js needs this information too, the channel name is saved as far as I know:

session.message.address.channelId

      



and in:

session.message.source

      

+2


source







All Articles