简体   繁体   中英

Identify when a user is using the skype web control - on botframework

I'm looking for a way to identify whether a user is sending a message with the Skype web control and not through the standard client. Is there any parameter attached to the session object or any other way to do so? Or maybe a ref parameter like Facebook messenger has?

I would like to know also if the user is authenticated or not - I could see that the name is always Guest but it doesn't seem to be a very robust way to check it.

You can detect it via bot receive middleware event, eg

bot.use({
  receive: function (event, next) {
    // handle `event.entities` for your needs
    console.log(event.entities)
    next();
  },
}); 

the event.entities shoule be like:

 [ { locale: 'en-US',
       country: 'US',
       platform: 'Web',
       type: 'clientInfo' } ],

and for skype for web, the platform property is Web , for windows client, the platform property is Windows .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM