2cec3b0c4568a6b8f762ff46d285df710047d2a1
SlidingSync when retrieving notifications to get more information (#2252)
* feat: run a room sliding sync upon receiving a notification, to get its full content * test: add test for the new sliding-sync in notifications \o/ * fix: try to get the push rules *after* a possibly-successful event decryption * feat: set `is_noisy` only if we could build a push context, and test it * feat: expose the `legacy_get_notification` in the FFI layer * feat: retrieve events with a `/context` query * fix: also request the client's user id's member information to get their display name * feat: include the list of invites in the notification sliding sync * feat: repeat the query multiple times if the event hasn't been immediately found * chore: simplify retrying decryption * chore: fail the sliding sync when fetching a notification if not using a memory store * chore: update test expectations + sort invites by recency * chore: cargo fmt * chore: simplify getting push actions Either they were already available in the timeline event if we had to re-run decryption, or we manually compute them. (Previous comment was incorrect, the `push_actions` are now optional because of another PR of yours truly.) * fixup! chore: fail the sliding sync when fetching a notification if not using a memory store * feat: try to handle invites correctly * chore: build a local client with an in-memory store instead of reusing the parent client * fix: remove dubious annotation * feat: allow cloning a Client and modify it on the fly, use that for the notification client * feat: get rid of the with_memory_state_store public func on ClientBuilder * feat: include sender_id in the notification invite event * feat: put sender's id in the `NotificationSenderInfo` * feat: inherit the parent session when creating a notification client * chore: reformat comments * TMP: add logs * chore: regenerate the olm machine when inheriting a session too * chore: keep the parent client around for legacy_get_notification/with_context
matrix-rust-sdk
matrix-rust-sdk is an implementation of a Matrix client-server library in Rust.
Project structure
The rust-sdk consists of multiple crates that can be picked at your convenience:
- matrix-sdk - High level client library, with batteries included, you're most likely interested in this.
- matrix-sdk-base - No (network) IO client state machine that can be used to embed a Matrix client in your project or build a full fledged network enabled client lib on top of it.
- matrix-sdk-crypto - No (network) IO encryption state machine that can be used to add Matrix E2EE support to your client or client library.
Minimum Supported Rust Version (MSRV)
These crates are built with the Rust language version 2021 and require a minimum compiler version of 1.70.
Status
The library is in an alpha state, things that are implemented generally work but the API will change in breaking ways.
If you are interested in using the matrix-sdk now is the time to try it out and provide feedback.
Bindings
Some crates of the matrix-rust-sdk can be embedded inside other
environments, like Swift, Kotlin, JavaScript, Node.js etc. Please,
explore the bindings/ directory to learn more.
License
Description
Languages
Rust
99.7%
HTML
0.2%