mirror of
https://github.com/matrix-org/sliding-sync.git
synced 2025-03-10 13:37:11 +00:00

Previously the 'initial' flag was set on the entire response which was pointless as the client can detect this by the presence/absence of `?pos=`. Instead, move the `initial` flag to be present on the Room object, so clients know when to replace or update their databases. Use this to fix a bug where the timeline would show incorrectly when clicking on rooms due to appending to the timeline when the room subscription data was collected.
Sliding Sync Client
This is a basic JS client for Sliding Sync. It is designed to be easily readable and is aimed at developers who want to implement Sliding Sync into their clients. The client is broken up into:
devtools.js
: Code for showing developer statistics.index.js
: Entry point for the client and hooks into the DOM.render.js
: Code to convert data structures into DOM nodes.sync.js
: Sliding Sync code.
To understand sliding sync, you need to read index.js
and sync.js
. The rest of it can be ignored.
The client code uses Prettier as a code formatter.