Commit Graph

7291 Commits

Author SHA1 Message Date
Kévin Commaille acfb999e76 base: Make BaseRoomInfo compatible with room version 11
By copying the sender field as the creator field of m.room.create's event content

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2023-09-28 16:54:03 +02:00
Benjamin Bouvier 79f408b511 feat: automatically reload the tracked users when getting the cache 2023-09-28 16:37:52 +02:00
Benjamin Bouvier c18ac12ce9 Apply suggestions from code review
Co-authored-by: Damir Jelić <poljar@termina.org.uk>
2023-09-28 16:37:52 +02:00
Benjamin Bouvier 216b3b9d77 feat: add a dummy StoreCacheGuard too, and make use of it 2023-09-28 16:37:52 +02:00
Benjamin Bouvier 00d6b2d2ae chore: rename Store::load_tracked_users to Store::ensure_sync_tracked_users 2023-09-28 16:37:52 +02:00
Benjamin Bouvier 2499d13839 chore: remove outdated code comment 2023-09-28 16:37:52 +02:00
Benjamin Bouvier 074bcca02e feat: introduce dummy crypto cache for the store 2023-09-28 16:37:52 +02:00
Benjamin Bouvier 851b3f2982 chore(crypto): simplify Store::load_tracked_users 2023-09-28 16:37:52 +02:00
Daniel Abramov 585508f461 sdk(widget): Add the matrix (i/o) part 2023-09-28 16:01:26 +02:00
Hubert Chathi 4478826a2f Fix a typo 2023-09-28 15:31:25 +02:00
Marco Romano 0158422dcd Bump ruma
- Bumps ruma to include https://github.com/ruma/ruma/pull/1665
- Enables ruma `compat-arbitrary-length-ids` flag instead of using the now deprecated `lax-id-validation`
2023-09-28 14:01:18 +02:00
Damir Jelić 1f695bf26e Move most of our locks in the Client into the ClientLocks struct 2023-09-28 13:06:09 +02:00
Damir Jelić e37cfe6036 Don't use a static for the mark_room_as_dm lock
Using a static lock would prevent two Client instances to call the
method at the same time.

We're going to assume that people won't have multiple Client instances
for the same user, in which case a static lock would have been helpful.

Co-authored-by: Jonas Platte <jplatte@matrix.org>
2023-09-28 13:06:09 +02:00
Richard van der Hoff bcbb7c61f8 Enable the tests for encrypted indexeddb stores
Empirically, these seem to work for me, so let's re-enable them
2023-09-28 12:53:40 +02:00
Valere 4c432a66b4 Distinguish between changed and unchanged user identities (#2618) 2023-09-28 10:14:09 +02:00
Damir Jelić 24a203a126 Ensure that we can't try to mark two rooms as a DM at the same time 2023-09-27 16:24:57 +02:00
Jonas Platte cbb7b24cb5 Rewrite public widget API 2023-09-27 14:45:33 +02:00
Jonas Platte ae524b3fa6 ffi: Use FFI's tokio runtime explicitly for acquire_permissions 2023-09-27 13:13:27 +02:00
Richard van der Hoff 563072e7f8 Change the way we store gossip requests in indexeddb (#2626)
Instead of using three separate object stores, use a single one with some structured objects and indexes.

Fixes #2605 (or at least, should make whatever is going wrong much more obvious).

Consists of a series of commits which should be reviewable on their own.
2023-09-27 11:43:07 +01:00
Richard van der Hoff e3d9408d0a matrix-sdk-common: add js console tracing layer (#2620)
Implement a `tracing_subsciber` `Layer` which sends output to the javascript
console.

Obviously, this only works on the wasm32 target.

This is lifted from `matrix-rust-sdk-crypto-wasm`, so that we can use it in
tests etc for other crates.
2023-09-27 11:42:33 +01:00
Jonas Platte b35d40d111 test: Remove unused sync events from test_json 2023-09-27 10:06:32 +02:00
Jonas Platte 3196ac53b2 test: Remove TimelineTestEvent 2023-09-27 10:06:32 +02:00
Jonas Platte 145c5078f2 test: Remove example from SyncResponseBuilder docs
It is only an internal utility, we can copy-paste from other tests.
2023-09-27 10:06:32 +02:00
Jonas Platte 62ecff3e1d test: Remove outdated documentation 2023-09-27 10:06:32 +02:00
Richard van der Hoff fcd593b0bf Improve documentation on xtask ci {wasm,wasm-pack} 2023-09-26 21:30:40 +02:00
Richard van der Hoff 299256fe50 Fix IndexeddbCryptoStore::get_outgoing_secret_requests
Fix a bug which caused `get_outgoing_secret_requests` to return no data.

This is exposed as a public function, and when called that way it does *not*
expect the key to be escaped and encrypted.
2023-09-26 17:40:16 +02:00
Jonas Platte 956d5ef7e7 ffi: Update Room::edit to not make unnecessary network requests 2023-09-26 15:29:23 +02:00
Jonas Platte 2e27142336 ui: Add highlevel API for editing 2023-09-26 15:29:23 +02:00
Jonas Platte 9aa1dd725d test: Use EventBuilder for timeline edit integration test 2023-09-26 15:29:23 +02:00
Jonas Platte 6a69543f64 test: Move timeline edit integration test into new module 2023-09-26 15:29:23 +02:00
Jonas Platte 88194b6828 ui: Remove outdated documentation 2023-09-26 15:29:23 +02:00
Daniel Abramov a1d67206b6 sdk(widget): temporarily supress dead code warning 2023-09-26 13:19:38 +02:00
Daniel Abramov d017bab144 sdk(widget): add sans-io client api impl skeleton 2023-09-26 13:19:38 +02:00
Benjamin Bouvier 1180c6aef9 feat: add integration test for fetch_members causing UTDs 🧪 2023-09-26 12:33:41 +02:00
Benjamin Bouvier 43723c88ec feat: add unit tests 🧪 2023-09-26 12:33:41 +02:00
Benjamin Bouvier cb14813f84 chore: address review comments 2023-09-26 12:33:41 +02:00
Benjamin Bouvier e9362f75f2 chore: fix test that was affected by the issue
An encryption state request was failing, but before the patch, subsequent
requests would end up in success, while this wasn't the case. The new failure
introduced by this patch was a real one, because the encryption state was
not mocked as part of this test (which tries to send a message to a homeserver).
2023-09-26 12:33:41 +02:00
Benjamin Bouvier 502ecfa636 chore: get rid of the outer pinned box, weeeee 2023-09-26 12:33:41 +02:00
Benjamin Bouvier 928be57666 chore: polish DeduplicatedRequestHandler API 2023-09-26 12:33:41 +02:00
Benjamin Bouvier f5521e9e1c feat/fix: also correctly deduplicate preshare_room_key 2023-09-26 12:33:41 +02:00
Benjamin Bouvier 3aa5d12ab7 feat/fix: implement DeduplicatedRequestHandler + use it for encryption_state_request 2023-09-26 12:33:41 +02:00
Benjamin Bouvier e9d6351471 fix: also check the result of base::Client::receive_members 2023-09-26 12:33:41 +02:00
Benjamin Bouvier 120ac7150c reformat: no else after return 2023-09-26 12:33:41 +02:00
Benjamin Bouvier 2a235d8ea6 fix: signal that a concurrent request failed to the caller, instead of assuming it succeeded 2023-09-26 12:33:41 +02:00
Benjamin Bouvier a08327907c fix: don't cause that any /members request following a failed one result in immediate success 2023-09-26 12:33:41 +02:00
Jonas Platte a3799190d4 ui: Remove sender information from logs where it's not relevant 2023-09-26 11:26:25 +02:00
Jonas Platte e8528926be ui: Move debug-logging code out of main event handler logic 2023-09-26 11:26:25 +02:00
Alfonso Grillo b248aa9862 ffi: Add push notification support for unstable m.poll.start 2023-09-26 10:38:24 +02:00
Jonas Platte f47b7f02cc Use as_variant macro in more cases 2023-09-26 10:14:04 +02:00
Jonas Platte 6e15e34700 Use bool::then where applicable 2023-09-26 10:14:04 +02:00