Jonas Platte
504861a532
sqlite: Upgrade deadpool, rusqlite
2023-10-04 15:43:08 +02:00
Jonas Platte
749b4df321
ui: Move magic number to a named constant
2023-10-04 13:23:47 +02:00
Jonas Platte
7482246668
test: Test timeline reset while pagination is running
2023-10-04 13:23:47 +02:00
Jonas Platte
2bc0651c94
test: Test back-pagination request deduplication
2023-10-04 13:23:47 +02:00
Jonas Platte
7f934040bc
test: Test wait_for_token functionality in back-pagination
2023-10-04 13:23:47 +02:00
Jonas Platte
b9c05ca934
test: Move room messages test JSON to the only module that uses it
2023-10-04 13:23:47 +02:00
Jonas Platte
f62d561cb0
ui: Verify token before prepending events from back-pagination
2023-10-04 13:23:47 +02:00
Jonas Platte
6cfa383652
ui: Move BackPaginationStatus definition to pagination module
2023-10-04 13:23:47 +02:00
Jonas Platte
1ab305a9d8
ui: Store back-pagination tokens inside TimelineInnerMetadata
2023-10-04 13:23:47 +02:00
Jonas Platte
0dcfe4f4f5
ui: Fix a typo
2023-10-04 13:23:47 +02:00
Jonas Platte
03c70220a1
ui: Remove forwards pagination token
...
It's not currently used.
2023-10-04 13:23:47 +02:00
Benjamin Bouvier
0d592e4051
chore: make `Client::homeserver` not async by changing the underlying kind of mutex
...
The mutex used for the `homeserver` field is very short-lived, so use a std mutex instead, which
makes a few methods sync instead of async.
2023-10-03 14:25:48 +02:00
Alfonso Grillo
08b3c0e47e
Feature: add API for setting underride push rule's actions ( #2644 )
2023-10-03 10:08:17 +02:00
Benjamin Bouvier
7e8827aec2
fix: make the crypto memory store write the next_batch_token only if provided
...
This matches the behaviors of the two other implementations.
2023-10-02 19:05:07 +02:00
Benjamin Bouvier
3fa79ce891
chore: make the crypto stores more robust by serializing save_changes()
...
Stores may race when performing writes, since in `save_changes` some data is pickled, and live across await points (it could be stale after an
await point). To prevent multiple threads racing when calling into `save_changes`, a new lock is introduced there.
2023-10-02 19:05:07 +02:00
Benjamin Bouvier
76c3f2a139
chore: remove a few spurious `async` on `MemoryStore`
2023-10-02 19:05:07 +02:00
Benjamin Bouvier
8d6f414375
chore: move `CryptoStore::save_account` to `Store::save_account`
...
as it can be implemented in terms of other methods already present in the `CryptoStore` trait.
2023-10-02 19:05:07 +02:00
Benjamin Bouvier
7203ae9576
fix: use insecure OIDC whenever configuring with an http homeserver URL ( #2652 )
...
Fixes https://github.com/matrix-org/matrix-rust-sdk/issues/2645 .
The previous PR only enabled support for `server_name` homeserver configurations, this makes it work for `homeserver_url` too.
2023-10-02 10:27:30 +00:00
Ivan Enderlin
f7c008af3c
chore(ui): Add `repository` and `license` to `Cargo.toml`.
2023-10-02 09:41:29 +02:00
kegsay
58e15f812d
oidc: allow http scheme during discovery ( #2642 )
...
This is to enable entirely local stacks of Element X to work correctly. It's mostly seamless (no ffi changes) because it ties into `ClientBuilder.insecure_server_name_no_tls()`.
---------
Co-authored-by: Benjamin Bouvier <public@benj.me>
2023-09-29 11:29:30 +00:00
Benjamin Bouvier
9cc9221808
notifications: match decryption errors more precisely when waiting for decryption in the background
2023-09-29 12:37:16 +02:00
Benjamin Bouvier
e679182fb5
fix(notifications): don't hard-fail if decrypting failed
...
Before this commit, a call to get_notification would fail if decrypting failed on the first attempt, because `Room::decrypt_event` will hard-fail if the key wasn't found.
2023-09-29 12:37:16 +02:00
Benjamin Bouvier
787a85615c
chore(notifications): tweak logs in notification client
2023-09-29 12:37:16 +02:00
Benjamin Bouvier
6a5a4db5fc
fix(notifications): add a mutex to serialize e2ee encryption requests
2023-09-29 12:37:16 +02:00
Benjamin Bouvier
1cedd1097a
chore(notifications): rename `sliding_sync_mutex` to `notification_sync_mutex`
2023-09-29 12:37:16 +02:00
Benjamin Bouvier
2677d16f2e
chore: look ma i'm a 10x engineer ok
2023-09-29 12:25:52 +02:00
Benjamin Bouvier
1e5e13bb19
chore: make use of `StaticAccountData` in one extra location
2023-09-29 12:25:52 +02:00
Benjamin Bouvier
1eeee288b9
chore: move `unsigned_device_keys` to `StaticAccountData` too
2023-09-29 12:25:52 +02:00
Benjamin Bouvier
e4fd8e7ac6
chore: move methods from `ReadOnlyAccount` to `StaticAccountData`
2023-09-29 12:25:52 +02:00
Valere
ab2f18df3b
Add new API to request missing secrets ( #2641 )
2023-09-29 12:12:34 +02:00
Benjamin Bouvier
a1f6e2fb16
chore: clippy + remove spurious Arc
2023-09-28 17:21:53 +02:00
Benjamin Bouvier
8f541c9a09
chore: remove `ReadOnlyAccount` from the `Account`
...
And use the `self.store.account()` when we really need the `ReadOnlyAccount`. Also cache the immutable account data in this Account.
2023-09-28 17:21:53 +02:00
Benjamin Bouvier
c01d2d990c
chore: use `StaticAccountData` in more places
...
Sorry, this commit is a bit big. What happened is that I've pulled a thread: put a `StaticAccountData` there, look at caller; it seems to use only a
static account too, so keep up.
The only contender was the `OwnUserIdentity` data structure which really wants to sign things. Lucky for us, we could pass it a `ReadOnlyAccount`
from a store, in those cases, since we always had a `Store` hanging around; in the future it'll read it from the store cache, which is somewhat
identical.
2023-09-28 17:21:53 +02:00
Benjamin Bouvier
13be4b0dce
chore: use a `StaticAccountData` in the Sas data structures
2023-09-28 17:21:53 +02:00
Benjamin Bouvier
650d99a875
chore: rename account_info/get_account_info to static_account/get_static_account
2023-09-28 17:21:53 +02:00
Benjamin Bouvier
1c311555ef
chore: put the immutable parts of `ReadOnlyAccount` into its own data struct
2023-09-28 17:21:53 +02:00
Kévin Commaille
f115bd0e25
base: Fix typo
...
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2023-09-28 16:54:03 +02:00
Kévin Commaille
4595e2c064
indexeddb: Close DB less often during migrations
...
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2023-09-28 16:54:03 +02:00
Kévin Commaille
f3b8bdbe1e
indexeddb: Migrate RoomInfo to new format
...
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2023-09-28 16:54:03 +02:00
Kévin Commaille
23b34bfc2b
indexeddb: Make sure each migration is discrete
...
We might need to rely on the data in the DB to already be corrected
before using it for another migration
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2023-09-28 16:54:03 +02:00
Kévin Commaille
d4f0f7a704
sqlite: Migrate RoomInfo to new format
...
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2023-09-28 16:54:03 +02:00
Kévin Commaille
0856cf10fe
base: Add migration helpers for converting serialized format of RoomInfo
...
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2023-09-28 16:54:03 +02:00
Kévin Commaille
cd4bc7a62c
base: Return m.room.create event's content even if it is redacted
...
Starting with room version 11, all fields are kept when the event is redacted
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2023-09-28 16:54:03 +02:00
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