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?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
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".
回答2:
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