feat(utilities): WS device type

This commit is contained in:
Taha Yassine Kraiem 2022-02-10 22:43:14 +01:00
parent 5c5086fcc7
commit a6af2cfb46

View file

@ -137,7 +137,7 @@ function extractSessionInfo(socket) {
socket.handshake.query.sessionInfo.userBrowser = ua.browser.name || null;
socket.handshake.query.sessionInfo.userBrowserVersion = ua.browser.version || null;
socket.handshake.query.sessionInfo.userDevice = ua.device.model || null;
socket.handshake.query.sessionInfo.userDeviceType = ua.device.type || (ua.device.model ? null : 'desktop');
socket.handshake.query.sessionInfo.userDeviceType = ua.device.type || 'desktop';
socket.handshake.query.sessionInfo.userCountry = null;
const options = {