From c678f008986a8db827654c7d0c3ddcc884a5e190 Mon Sep 17 00:00:00 2001 From: thearturca Date: Tue, 29 Oct 2024 21:00:09 +0300 Subject: [PATCH] fix(client): adds protocol to custom wsServerUrl --- src/client.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/client.ts b/src/client.ts index 5fe30fe..6f29c9a 100644 --- a/src/client.ts +++ b/src/client.ts @@ -117,7 +117,9 @@ class VKPLMessageClient extends EventEmitter< this.api = new VkplApi(this.messageParser, this.auth); this.api.on("refreshed", (token) => this.onRefreshToken(token)); this.channelNames = config.channels; - this.wsServerUrl = config.wsServer ?? this.wsServerUrl; + this.wsServerUrl = config.wsServer + ? `${config.wsServer}?cf_protocol_version=v2` + : this.wsServerUrl; this.centrifugeClient = new CentrifugeClient( this.wsServerUrl, this.api,