@hocuspocus/provider 2.12.0-rc.0 → 2.12.2-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.
@@ -1858,7 +1858,7 @@ class HocuspocusProviderWebsocket extends EventEmitter {
1858
1858
  this.lastMessageReceived = 0;
1859
1859
  this.identifier += 1;
1860
1860
  // Init the WebSocket connection
1861
- const ws = new this.configuration.WebSocketPolyfill(this.url, { followRedirects: true });
1861
+ const ws = new this.configuration.WebSocketPolyfill(this.url);
1862
1862
  ws.binaryType = 'arraybuffer';
1863
1863
  ws.identifier = this.identifier;
1864
1864
  this.attachWebSocketListeners(ws, reject);
@@ -2817,6 +2817,10 @@ class TiptapCollabProvider extends HocuspocusProvider {
2817
2817
  }
2818
2818
  super(configuration);
2819
2819
  this.tiptapCollabConfigurationPrefix = '__tiptapcollab__';
2820
+ if (configuration.user) {
2821
+ this.userData = new Y.PermanentUserData(this.document, this.document.getMap('__tiptapcollab__users'));
2822
+ this.userData.setUserMapping(this.document, this.document.clientID, configuration.user);
2823
+ }
2820
2824
  }
2821
2825
  /**
2822
2826
  * note: this will only work if your server loaded @hocuspocus-pro/extension-history, or if you are on a Tiptap business plan.