remove old chatbox

This commit is contained in:
Jeff Emmett 2024-10-18 22:47:23 -04:00
parent c93b3066bd
commit 07556dd53a
1 changed files with 7 additions and 3 deletions

View File

@ -100,9 +100,13 @@ export class TldrawDurableObject {
const initialSnapshot = roomFromBucket const initialSnapshot = roomFromBucket
? ((await roomFromBucket.json()) as RoomSnapshot) ? ((await roomFromBucket.json()) as RoomSnapshot)
: undefined : undefined
console.log("room data", roomFromBucket) if (initialSnapshot) {
const serializedRoom = JSON.stringify(initialSnapshot, null, 2) for (const record of initialSnapshot?.documents) {
console.log("serialized room", serializedRoom) if (record.state.typeName === "chatBox") {
console.log("chatbox", 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.
// it's up to us to persist the room state to R2 when needed though. // it's up to us to persist the room state to R2 when needed though.
return new TLSocketRoom<TLRecord, void>({ return new TLSocketRoom<TLRecord, void>({