fix chatbox
This commit is contained in:
parent
2ca6705599
commit
4319a6b1ee
|
|
@ -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.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue