@azure/web-pubsub 1.1.4-alpha.20241031.1 → 1.1.4-alpha.20241111.1

Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.js CHANGED
@@ -2390,9 +2390,14 @@ class WebPubSubServiceClient {
2390
2390
  const endpoint = this.endpoint.endsWith("/") ? this.endpoint : this.endpoint + "/";
2391
2391
  const clientEndpoint = endpoint.replace(/(http)(s?:\/\/)/gi, "ws$2");
2392
2392
  const clientProtocol = updatedOptions.clientProtocol;
2393
- const clientPath = clientProtocol && clientProtocol === "mqtt"
2394
- ? `clients/mqtt/hubs/${this.hubName}`
2395
- : `client/hubs/${this.hubName}`;
2393
+ let clientPath = `client/hubs/${this.hubName}`;
2394
+ switch (clientProtocol) {
2395
+ case "mqtt":
2396
+ clientPath = `clients/mqtt/hubs/${this.hubName}`;
2397
+ break;
2398
+ case "socketio":
2399
+ clientPath = `clients/socketio/hubs/${this.hubName}`;
2400
+ }
2396
2401
  const baseUrl = clientEndpoint + clientPath;
2397
2402
  let token;
2398
2403
  if (coreAuth.isTokenCredential(this.credential)) {