diff --git a/app/durableObjects/ChatRoom.server.ts b/app/durableObjects/ChatRoom.server.ts index 9389afaa..19ed5fa2 100644 --- a/app/durableObjects/ChatRoom.server.ts +++ b/app/durableObjects/ChatRoom.server.ts @@ -30,6 +30,8 @@ export class ChatRoom extends Server { env: Env db: DrizzleD1Database> | null + // static options = { hibernate: true } + constructor(ctx: DurableObjectState, env: Env) { super(ctx, env) this.env = env @@ -46,12 +48,12 @@ export class ChatRoom extends Server { log({ eventName: 'onStart', meetingId }) this.db = getDb(this) // TODO: make this a part of partyserver - this.ctx.setWebSocketAutoResponse( - new WebSocketRequestResponsePair( - JSON.stringify({ type: 'partyserver-ping' }), - JSON.stringify({ type: 'partyserver-pong' }) - ) - ) + // this.ctx.setWebSocketAutoResponse( + // new WebSocketRequestResponsePair( + // JSON.stringify({ type: 'partyserver-ping' }), + // JSON.stringify({ type: 'partyserver-pong' }) + // ) + // ) } async onConnect( diff --git a/app/hooks/useRoom.ts b/app/hooks/useRoom.ts index f103b23c..ca05999d 100644 --- a/app/hooks/useRoom.ts +++ b/app/hooks/useRoom.ts @@ -63,16 +63,16 @@ export default function useRoom({ } }, [websocket]) - // setup a simple ping pong - useEffect(() => { - const interval = setInterval(() => { - websocket.send( - JSON.stringify({ type: 'partyserver-ping' } satisfies ClientMessage) - ) - }, 5000) - - return () => clearInterval(interval) - }, [websocket]) + // // setup a simple ping pong + // useEffect(() => { + // const interval = setInterval(() => { + // websocket.send( + // JSON.stringify({ type: 'partyserver-ping' } satisfies ClientMessage) + // ) + // }, 5000) + // + // return () => clearInterval(interval) + // }, [websocket]) const identity = useMemo( () => roomState.users.find((u) => u.id === websocket.id), diff --git a/package-lock.json b/package-lock.json index 9474c47a..5ea35115 100644 --- a/package-lock.json +++ b/package-lock.json @@ -29,7 +29,7 @@ "cookie": "^0.6.0", "drizzle-orm": "^0.33.0", "nanoid": "^5.0.7", - "partyserver": "^0.0.51", + "partyserver": "^0.0.57", "partysocket": "^1.0.2", "react": "^18.3.1", "react-dom": "^18.3.1", @@ -11905,9 +11905,10 @@ } }, "node_modules/partyserver": { - "version": "0.0.51", - "resolved": "https://registry.npmjs.org/partyserver/-/partyserver-0.0.51.tgz", - "integrity": "sha512-af+RnzhaQYSdX8ow25z01y4BM6KosdmBbz9tPpdKhnDx4XdHyu4p8Y8dhExsX2GgX4Huw9EtMLp8efY1i91mTQ==", + "version": "0.0.57", + "resolved": "https://registry.npmjs.org/partyserver/-/partyserver-0.0.57.tgz", + "integrity": "sha512-AVoNcslX+z8XjcESoNFC0WLYIH0WdxtnbaRKOHqHfzVOmEDvOlh/WUsWxeRY38f5v6aFH/gyUHNcxiW1KXlabw==", + "license": "ISC", "dependencies": { "nanoid": "^5.0.7" }, @@ -24557,9 +24558,9 @@ "dev": true }, "partyserver": { - "version": "0.0.51", - "resolved": "https://registry.npmjs.org/partyserver/-/partyserver-0.0.51.tgz", - "integrity": "sha512-af+RnzhaQYSdX8ow25z01y4BM6KosdmBbz9tPpdKhnDx4XdHyu4p8Y8dhExsX2GgX4Huw9EtMLp8efY1i91mTQ==", + "version": "0.0.57", + "resolved": "https://registry.npmjs.org/partyserver/-/partyserver-0.0.57.tgz", + "integrity": "sha512-AVoNcslX+z8XjcESoNFC0WLYIH0WdxtnbaRKOHqHfzVOmEDvOlh/WUsWxeRY38f5v6aFH/gyUHNcxiW1KXlabw==", "requires": { "nanoid": "^5.0.7" } diff --git a/package.json b/package.json index 2166f919..fdc22dcf 100644 --- a/package.json +++ b/package.json @@ -54,7 +54,7 @@ "cookie": "^0.6.0", "drizzle-orm": "^0.33.0", "nanoid": "^5.0.7", - "partyserver": "^0.0.51", + "partyserver": "^0.0.57", "partysocket": "^1.0.2", "react": "^18.3.1", "react-dom": "^18.3.1",