Skip to content
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

Complete the implementation of the CS API backend #1

Merged
merged 17 commits into from Jun 4, 2019

Conversation

@Kagamihime
Copy link
Owner

commented Jun 4, 2019

No description provided.

Kagamihime added 17 commits May 28, 2019
Join a room if the provided account isn't a member
This makes the program automatically joins a room if the account
provided by the user hasn't joined it yet, so that it will be
able to retrieve its events DAG.
This is done by implementing the /joined_rooms and /join requests from
the Matrix CS API.
lib.rs: Refactor the code
This is a refactoring of the code which aims at improving its
readability. By renaming some variables and moving some some code
into smaller functions.
lib.rs: Save batch tokens when syncing
This saves the prev_batch and next_batch tokens when syncing so that
they can be used to get more messages afterwards.
cs_backend: Refactor the backend
This refactors the `backend` module in order to have a cleaner
separation between the object `Model` and the CS API backend.
lib.rs: Clean up variables when disconnecting
This avoids bugs involving data from previous sessions when connecting/
disconnecting several times.
dag.rs: Add a method to add earlier events
This adds the method `add_prev_events` which adds earlier events to
the events DAG.
backend.rs: Add the `from` field in `/sync` request
This adds the `from` field in the `/sync` request to get new events.
dag.rs: Refactor the code
This is a refactoring of the code which creates some helper functions
and improves the readability.
lib.rs: Periodically request new events
This allows the application to make multiple `/sync` requests in order
to get new events.
lib.rs: Remove deprecated console logging
This removes deprecated console messages as we used them for testing
functionality which are now working correctly.

@Kagamihime Kagamihime merged commit 0e8986b into master Jun 4, 2019

@Kagamihime Kagamihime deleted the cs-api branch Jun 4, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.