@hocuspocus/provider 2.13.2 → 2.13.5-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2833,7 +2833,12 @@ const uuidv4 = () => uuidv4Template.replace(/[018]/g, /** @param {number} c */ c
2833
2833
  class TiptapCollabProviderWebsocket extends HocuspocusProviderWebsocket {
2834
2834
  constructor(configuration) {
2835
2835
  var _a;
2836
- super({ ...configuration, url: (_a = configuration.baseUrl) !== null && _a !== void 0 ? _a : `wss://${configuration.appId}.collab.tiptap.cloud` });
2836
+ let url = (_a = configuration.baseUrl) !== null && _a !== void 0 ? _a : `wss://${configuration.appId}.collab.tiptap.cloud`;
2837
+ if (configuration.shardKey) {
2838
+ url += url.includes('?') ? '&' : '?';
2839
+ url += `shard=${configuration.shardKey}`;
2840
+ }
2841
+ super({ ...configuration, url });
2837
2842
  }
2838
2843
  }
2839
2844