fix chatbox

This commit is contained in:
Jeff Emmett 2024-10-18 23:09:25 -04:00
parent 2ca6705599
commit 4319a6b1ee
1 changed files with 6 additions and 1 deletions

View File

@ -3,6 +3,7 @@
import { RoomSnapshot, TLSocketRoom } from '@tldraw/sync-core' import { RoomSnapshot, TLSocketRoom } from '@tldraw/sync-core'
import { import {
TLRecord, TLRecord,
TLShape,
createTLSchema, createTLSchema,
// defaultBindingSchemas, // defaultBindingSchemas,
defaultShapeSchemas, defaultShapeSchemas,
@ -102,7 +103,11 @@ export class TldrawDurableObject {
: undefined : undefined
if (initialSnapshot) { if (initialSnapshot) {
initialSnapshot?.documents.slice(0, 10).forEach(record => { 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. // create a new TLSocketRoom. This handles all the sync protocol & websocket connections.