Skip to content

feat(shared): Define shared WebSocket message payload schema for USER_JOINED - #210

Open
Daksh7785 wants to merge 5 commits into
Dharm3112:mainfrom
Daksh7785:feat/define-shared-websocket-message-payload-sche
Open

feat(shared): Define shared WebSocket message payload schema for USER_JOINED#210
Daksh7785 wants to merge 5 commits into
Dharm3112:mainfrom
Daksh7785:feat/define-shared-websocket-message-payload-sche

Conversation

@Daksh7785

Copy link
Copy Markdown

What does this PR do?

This Pull Request adds the userJoinedPayloadSchema to packages/shared/src/schema.ts to strictly validate USER_JOINED WebSocket event payloads across the client and server.

Why is this necessary?

As per Issue #8, standardizing the payload schema (userId, roomId, and timestamp) prevents malformed WebSocket packets from crashing the Fastify server or causing runtime exceptions on the Next.js client, guaranteeing robust real-time communication.

How was this verified?

  • Verified Zod syntax and TypeScript constraints.
  • Added default timestamp injection logic.

Thank you for reviewing my PR! Let me know if any changes are required.

@vercel

vercel Bot commented Jul 19, 2026

Copy link
Copy Markdown

Someone is attempting to deploy a commit to the Dharm3112's projects Team on Vercel.

A member of the Team first needs to authorize it.

@netlify

netlify Bot commented Jul 19, 2026

Copy link
Copy Markdown

👷 Deploy request for intellicircle pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit d6d09c7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant