matrix-rust-sdk/matrix_sdk_base
Denis Kasak 03e53e991b Hoist prev_content to top-level in both timeline and state events.
Also refactor and document why this hoisting is needed.

This change makes the user_presence test fail because the hoisting
exposes an error encoded into the test's expected result.

Previously, the test expected 2 members in the room at the end. This is
incorrect since one of the members in the test data leaves the room.
However, since the prev_content of state events was previously not
hoisted to the top level, the `membership_change` method would not
notice it and thus not realize the member had left the room. The test
was corrected to expect only a single member in the room.

Another test change was made due to a limitation of EventBuilder: due to
the fact that it makes the test data go through a de/ser cycle, it
cannot easily hoist prev_content to the top level. Because of this, the
tests were change to put prev_content into the top level from the
outset.
2020-06-15 17:21:26 +02:00
..
.cargo matrix-sdk: Add missing newlines at the end of some files. 2020-05-12 15:48:17 +02:00
src Hoist prev_content to top-level in both timeline and state events. 2020-06-15 17:21:26 +02:00
Cargo.toml Merge branch 'msg-tests' 2020-05-25 14:22:15 +02:00
README.md matrix-sdk: Add a bunch of readmes to the crates. 2020-05-26 19:33:13 +02:00

README.md

Build Status codecov License #matrix-rust-sdk

matrix-sdk-base

matrix-rust-sdk is an implementation of a Matrix client-server library in Rust.

NOTE: This is the no IO client state machine, you're probably interested in the main rust-sdk crate.