-
-
Notifications
You must be signed in to change notification settings - Fork 365
feat(realtime): add support for broadcast replay configuration #1235
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Added ReplayOption type and replay field to RealtimeChannelBroadcastConfig to support configuring broadcast replay with 'since' timestamp and optional 'limit' parameter. Added BroadcastMeta type and meta field to BroadcastPayload for receiving replay metadata including replayed status and message id. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Pull Request Test Coverage Report for Build 18227834373Details
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think these changes in particular are enough to make it work, because RealtimeChannelBroadcastConfig
is not directly sent over wire, but instead read from inside subscribe
. I believe you need to read that information inside the function to generate the config_payload
correctly.
@o-santi just wrote a few tests to confirm this, and the config is properly sent over, no need for additional changes, can you review it again? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see what is happening. replay
is a subfield of broadcast
, which is already read from inside subscribe, so it is sent normally by wire. Small nitpick on temp file but should be correct.
supabase/.temp/cli-latest
Outdated
@@ -0,0 +1 @@ | |||
v2.47.2 No newline at end of file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this file is supposed to exist.
Summary
ReplayOption
type for configuring broadcast replayreplay
field toRealtimeChannelBroadcastConfig
BroadcastMeta
type for replay metadatameta
field toBroadcastPayload
to receive replay informationChanges
This PR implements broadcast replay support following the pattern from realtime-js PR #540:
since
(int) and optionallimit
(int)replay
fieldreplayed
(bool) andid
(str)meta
fieldUsage
Test plan
🤖 Generated with Claude Code