niklaslong / matrix-client

An experimental client for Matrix built in Elixir
1 stars 0 forks source link

Differentiate new timeline state from old timeline state #8

Closed fancycade closed 4 years ago

fancycade commented 4 years ago

After messing around with a fake bot I realized it would be helpful to have an easy way to differentiate between timeline state that has already been checked and new state.

The easiest way would be to have a map with timeline keys, and each key references the previous key and/or next batch.

Matrix sync has a notion of next batch so I believe we can use that.

niklaslong commented 4 years ago

Yes, initial sync returns a large payload, subsequent syncs are done via the long polling of next_batch. For reference: https://matrix.org/docs/spec/client_server/r0.6.1#syncing