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, e.g.
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
.