From fe7d367289d4ff7808166665f4821c52e6aad7cf Mon Sep 17 00:00:00 2001 From: Jeff Emmett <46964190+Jeff-Emmett@users.noreply.github.com> Date: Fri, 18 Oct 2024 23:09:25 -0400 Subject: [PATCH] fix chatbox --- worker/TldrawDurableObject.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/worker/TldrawDurableObject.ts b/worker/TldrawDurableObject.ts index 11bd786..20efc20 100644 --- a/worker/TldrawDurableObject.ts +++ b/worker/TldrawDurableObject.ts @@ -3,6 +3,7 @@ import { RoomSnapshot, TLSocketRoom } from '@tldraw/sync-core' import { TLRecord, + TLShape, createTLSchema, // defaultBindingSchemas, defaultShapeSchemas, @@ -102,7 +103,11 @@ export class TldrawDurableObject { : undefined if (initialSnapshot) { initialSnapshot?.documents.slice(0, 10).forEach(record => { - console.log("record", record) + const shape = record.state as TLShape + if (shape.type === "chatBox") { + console.log("FOUND CHATBOX") + console.log("record", record) + } }) } // create a new TLSocketRoom. This handles all the sync protocol & websocket connections.