Commit Graph

2577 Commits

Author SHA1 Message Date
Jonas Platte
1f2fd380b2 Upgrade Ruma to 0.5.0 2022-03-03 08:59:44 +01:00
Jonas Platte
012954e7f4 ci: Remove --all flag from cargo fmt arguments
It is only relevant for non-workspace path dependencies.
2022-03-02 14:34:22 +01:00
Jonas Platte
bc0c8d529e Simplify Cargo workspace configuration 2022-03-02 14:34:22 +01:00
Jonas Platte
ba3ccc7d3d Remove explicit 'static lifetimes from constants 2022-03-02 14:34:22 +01:00
Jonas Platte
b3f6d1cf63 Fix inconsistent indentation 2022-03-02 14:32:37 +01:00
Jonas Platte
af0375ca99 Remove unnecessary serialize / deserialize roundtrips 2022-03-02 14:26:49 +01:00
Jonas Platte
a1a0ae62ba base: Use Option::get_or_insert_with to get rid of an unwrap() call 2022-03-02 14:26:48 +01:00
Damir Jelić
dec4772740 Merge branch 'gnunicorn-limited-ci-runs' 2022-03-02 14:21:54 +01:00
Benjamin Kampmann
85dd7a03e2 fix(MemoryStore): undeadlock timeline saving
Merge pull request #509 from matrix-org/gnunicorn/issue508
2022-03-02 13:44:47 +01:00
Benjamin Kampmann
cf674b6a46 Update crates/matrix-sdk-base/src/store/memory_store.rs 2022-03-02 13:14:38 +01:00
Benjamin Kampmann
102f960d25 chore(ci): limit CI to pull-requests & push main
Running CI on every push means running it twice for any PR as well as commit on branches that aren't PRs. This limits the CI run to pull-requests against main and pushes to main directly, removing unnecessary workload for the CI and making PRs CI faster.
2022-03-02 13:01:18 +01:00
Benjamin Kampmann
7e2e43c51c Addressing review
Co-authored-by: Jonas Platte <jplatte+git@posteo.de>
2022-03-02 12:34:04 +01:00
Benjamin Kampmann
161d79eaa1 fixing typo 2022-03-02 12:22:47 +01:00
Benjamin Kampmann
eacffb5126 creating better tests, ensure sled and memory store act consistently 2022-03-02 12:13:07 +01:00
Benjamin Kampmann
40fa17f5b7 fixing timeline test 2022-03-02 08:36:10 +01:00
Benjamin Kampmann
9eee50da66 fixing clippy warnings 2022-03-01 15:32:23 +01:00
Benjamin Kampmann
2b9bb422cf fix(MemoryStore): undeadlock timeline saving 2022-03-01 14:39:27 +01:00
Damir Jelić
70490277eb fix(sdk): Use a short request retry for login/register/get_version methods 2022-02-28 15:26:30 +01:00
Damir Jelić
48fff04ffd Merge branch 'enable_ruma_unstable_pre_spec' 2022-02-28 14:20:52 +01:00
Manuel Schmidbauer
6bf7b212cf Changed register to really use short_retry() 2022-02-26 15:19:38 +01:00
Manuel Schmidbauer
01e080842a Implemented short_retry for intial methods
Implemented RequestConfig::short_retry()
Changed few client methods to use it
Adjusted and added tests for it
2022-02-26 15:13:04 +01:00
Julian Sparber
0dd623970b Enable 'unstable-pre-spec' ruma feature 2022-02-23 15:52:19 +01:00
Benjamin Kampmann
8414718371 feat(StateStore): Adding forward and backwards streams for room timelines
Merge pull request #486 from jsparber/timeline_stream
2022-02-23 14:38:14 +01:00
Benjamin Kampmann
78af96dab3 Clippy and Cargo fmt 2022-02-23 12:50:57 +01:00
Benjamin Kampmann
2598001c8f room version simplification 2022-02-23 12:40:37 +01:00
Benjamin Kampmann
c22b4fcfb2 minor refactor for simplicity 2022-02-23 12:37:10 +01:00
Damir Jelić
2b20055eb5 Merge branch 'test-refactor' 2022-02-23 10:30:23 +01:00
Damir Jelić
e846fedc3f feat(sdk): Support logging in using SSO with an identity provider 2022-02-23 10:27:07 +01:00
Julian Sparber
980076fd73 Merge remote-tracking branch 'origin/main' into timeline_stream 2022-02-22 17:30:51 +01:00
Julian Sparber
3378d18ca8 store: Add comment why we can ignore unexpected TimelineSlices 2022-02-22 16:49:42 +01:00
Julian Sparber
70e826ff25 Fix style issue 2022-02-22 15:48:56 +01:00
Julian Sparber
890a8675c9 store: Use BoxStream type without explicit lifetime 2022-02-22 15:43:26 +01:00
Julian Sparber
7627c142c4 Add method to optain timeline stream in one direction 2022-02-22 15:42:39 +01:00
Julian Sparber
84c46affa3 Fix example for Room::Common::timeline() 2022-02-22 12:51:44 +01:00
Benjamin Kampmann
5b1746e451 Merge pull request #503 from ShadowJonathan/labs-folder
Add `labs/` folder
2022-02-22 12:01:47 +01:00
Julian Sparber
d7592cce29 Merge remote-tracking branch 'origin/main' into timeline_stream 2022-02-22 11:47:17 +01:00
Julian Sparber
088086715f store: Save timeline to IndexedDbStore 2022-02-22 11:43:12 +01:00
Jonathan de Jong
7c9d139031 Apply suggestions from code review
Co-authored-by: Benjamin Kampmann <ben.kampmann@gmail.com>
2022-02-21 22:08:41 +01:00
Jonathan de Jong
28ac6f9f52 add labs folder 2022-02-21 21:37:56 +01:00
Jonas Platte
b39a72ceac matrix-sdk-test: Stop relying on event enum Serialize impls
In the latest version of Ruma, the event enums no longer implement
`Serialize` because it was somewhat of a footgun when custom /
unrecognized events were involved.
2022-02-21 14:50:41 +01:00
Benjamin Kampmann
1563ecdf1a Merge pull request #499 from matrix-org/ben-docs-for-custom-http-client
Minor improvements on ClientConfig
2022-02-17 20:37:47 +01:00
Benjamin Kampmann
7ab8872dd5 fix(Version): removing (crate only) VERSION const 2022-02-17 19:25:09 +01:00
Benjamin Kampmann
5d812d4aa7 fixing style 2022-02-17 19:09:10 +01:00
Benjamin Kampmann
1d0d32858b fix(ClientConfig): Do not expose crate version in user agent anymore 2022-02-17 18:53:32 +01:00
Julian Sparber
8e80e02a78 Add test for matrix_sdk::room::Common::timeline()
The test is only run when the `sled_state_store` feature is enabled.
This also changes the test_json::MORE_SYNC and test_json::MORE_SYNC_2 to
not responsed with a limited timeline.
2022-02-17 18:32:44 +01:00
Julian Sparber
9e7bee89c8 Add test for timeline cache 2022-02-17 18:32:44 +01:00
Julian Sparber
fb3edeb206 store: Save timeline to MemoryStore 2022-02-17 18:32:36 +01:00
Julian Sparber
516aa26589 store: Save timeline to SledStore
This writes slices from StateChanges::timeline to the SledStore.
The cache is removed when ever a limited sync response is received or
when an event already known to the store is received.

Stored events are redacted when a redaction event is received.
2022-02-17 16:15:17 +01:00
Julian Sparber
7d19e9aa34 test: Add mocked responses need for timeline storage 2022-02-17 16:15:17 +01:00
Julian Sparber
64c49cd137 Add stream to obtain the timeline of a room 2022-02-17 16:15:17 +01:00