Kegan Dougal 4a03b12287 client/server: set 'initial' flag on a per-room basis and use it when rendering
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.
2022-02-24 16:48:39 +00:00
..
2022-02-23 19:26:38 +00:00

Sliding Sync Client

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.