Skip to content
This repository was archived by the owner on Jun 10, 2026. It is now read-only.

feat(gateway): expose read_state.update event stream#1

Merged
krazyjakee merged 1 commit into
mainfrom
feat/read-state-update-event
Jun 10, 2026
Merged

feat(gateway): expose read_state.update event stream#1
krazyjakee merged 1 commit into
mainfrom
feat/read-state-update-event

Conversation

@krazyjakee

Copy link
Copy Markdown
Contributor

Summary

  • Surface the server's targeted read_state.update gateway event as a typed Stream<Map<String, dynamic>> (onReadStateUpdate) on both GatewaySocket and AccordClient.
  • Lets clients clear a channel's unread badge in real time when the user acks it on another device (multi-device read-state sync).

Details

  • lib/src/gateway/gateway_socket.dart: register _readStateUpdate controller, add onReadStateUpdate getter, dispatch case 'read_state.update'.
  • lib/src/core/accord_client.dart: passthrough getter.

Pairs with the server-side broadcast in DaccordProject/accordserver#27.

Test plan

  • dart analyze clean
  • Manual: ack a channel on one session, confirm onReadStateUpdate fires on another

🤖 Generated with Claude Code

Surface the server's targeted read_state.update gateway event as a typed
stream so clients can clear a channel's unread badge in real time when the
user acks it on another device.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant