How does bot framework identify the user so it knows to go and grab correct state data? It identifies user correctly when same channel is used, even on different machines. Does it user IP address or something similar?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
It is based on the Id property of the user + the channel Id. This user Id depends on the channel: each channel has a specific format of user Id, hence those 2 fields.
Examples:
- Webchat: by default is
userid
but can be changed:user: { id: 'userid' },
- Emulator: user ID is always set to
default-user
- Facebook Messenger: the user ID is a PSID (Page Scoped ID) of the user
- Slack: the user ID is made of the concatenation of several parameters: Slack's Team ID, Slack's channel ID, and Slack's User ID
- SMS: it's the phone number
- Email: it's the email address
- etc