Skip to content

Conversation

@edgurgel
Copy link
Member

🔍 Description

ref and join_ref can be null/undefined in certain scenarios like when publishing heartbeats.

Currently using JSON to send heartbeats so not an actual issue but in the future this can be changed and we want to be ready.

What changed?

Serializer handles null/undefined for join_ref and ref

Why was this change needed?

The Msg type is now fixed with optional join_ref and ref. Heartbeats for example don't send a join_ref as they don't have a specific channel to refer to.

📸 Screenshots/Examples

🔄 Breaking changes

  • This PR contains no breaking changes

📋 Checklist

  • I have read the Contributing Guidelines
  • My PR title follows the conventional commit format: <type>(<scope>): <description>
  • I have run npx nx format to ensure consistent code formatting
  • I have added tests for new functionality (if applicable)
  • I have updated documentation (if applicable)

📝 Additional notes

ref and join_ref can be null/undefined in certain scenarios like when publishing heartbeaats.

Currently using JSON to send heartbeats but in the future this can be
changed and we want to be ready
@edgurgel edgurgel requested review from a team as code owners November 17, 2025 00:36
@github-actions github-actions bot added the realtime-js Related to the realtime-js library. label Nov 17, 2025
@mandarini mandarini merged commit 91cfd78 into master Nov 17, 2025
20 checks passed
@mandarini mandarini deleted the fix/realtime-serializer-handle-missing-refs branch November 17, 2025 17:14
@edgurgel
Copy link
Member Author

Thanks, team

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

Labels

realtime-js Related to the realtime-js library.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants