Skip to content

Commit

Permalink
fix(client): adds protocol to custom wsServerUrl
Browse files Browse the repository at this point in the history
  • Loading branch information
thearturca committed Oct 29, 2024
1 parent 5f0bc1a commit c678f00
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,9 @@ class VKPLMessageClient<T extends string> 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,
Expand Down

0 comments on commit c678f00

Please sign in to comment.