diff --git a/excalidraw-app/collab/Collab.tsx b/excalidraw-app/collab/Collab.tsx index 98c66e425..0935e03fb 100644 --- a/excalidraw-app/collab/Collab.tsx +++ b/excalidraw-app/collab/Collab.tsx @@ -508,6 +508,7 @@ class Collab extends PureComponent { ); const fallbackInitializationHandler = () => { + console.log("fallbackInitializationHandler"); this.initializeRoom({ roomLinkData: existingRoomLinkData, fetchScene: true, @@ -577,7 +578,9 @@ class Collab extends PureComponent { case WS_SUBTYPES.INVALID_RESPONSE: return; case WS_SUBTYPES.INIT: { + console.log("INIT (1)"); if (!this.portal.socketInitialized) { + console.log("INIT (2)"); this.initializeRoom({ fetchScene: false }); const remoteElements = decryptedData.payload.elements; const reconciledElements = @@ -666,6 +669,7 @@ class Collab extends PureComponent { ); this.portal.socket.on("first-in-room", async () => { + console.log("first-in-room"); if (this.portal.socket) { this.portal.socket.off("first-in-room"); } diff --git a/excalidraw-app/collab/Portal.tsx b/excalidraw-app/collab/Portal.tsx index 26a7d0d9e..9b50c44b4 100644 --- a/excalidraw-app/collab/Portal.tsx +++ b/excalidraw-app/collab/Portal.tsx @@ -39,9 +39,17 @@ class Portal { this.roomId = id; this.roomKey = key; + this.socket.on("connect", () => { + console.log("connect"); + }); + + console.log("subbing to init-room"); + // Initialize socket listeners this.socket.on("init-room", () => { + console.log("init-room (1)"); if (this.socket) { + console.log("init-room (2)"); this.socket.emit("join-room", this.roomId); trackEvent("share", "room joined"); } @@ -54,6 +62,7 @@ class Portal { ); }); this.socket.on("room-user-change", (clients: SocketId[]) => { + console.log("room-user-change", clients); this.collab.setCollaborators(clients); });