diff --git a/src/lib/clients/Livechat.ts b/src/lib/clients/Livechat.ts index 863ae74f..5c8f5fbd 100644 --- a/src/lib/clients/Livechat.ts +++ b/src/lib/clients/Livechat.ts @@ -102,7 +102,9 @@ export default class LivechatClient extends LivechatRest implements ISocket { } async setUpConnection () { - const { token } = this.credentials - return (await this.socket as IDriver).methodCall('livechat:setUpConnection', { token }) + const { token } = this.credentials, + isMobile = !!window?.matchMedia('(max-width: 500px)')?.matches; + + return (await this.socket as IDriver).methodCall('livechat:setUpConnection', { token, isMobile }) } }