Richard van der Hoff
d116e31733
Implement new CryptoStoreWrapper ( #2515 )
...
... so that `VerificationStore` and `StoreInner` can share the same
`save_changes` impl which broadcasts updates to the broadcast channels.
2023-09-06 09:57:40 +01:00
Ivan Enderlin
f13282ea30
fix: & without an explicit lifetime name cannot be used here.
...
This was previously accepted by the compiler but is being phased out;
it will become a hard error in a future release! See https://github.com/
rust-lang/rust/issues/115010.
2023-09-06 09:37:51 +02:00
Benjamin Bouvier
896f62eb68
fix(tests): don't reuse the same store name in multiple tests
2023-09-05 18:45:51 +02:00
Benjamin Bouvier
cc469f6d4a
chore: derive Default for the state MemoryStore
2023-09-05 15:44:31 +02:00
Jonas Platte
2d47aecd37
Remove the appservice feature from matrix-sdk, matrix-sdk-test
2023-09-05 15:40:38 +02:00
Jonas Platte
7d674b39aa
Remove matrix-sdk-appservice
...
There is unfortunately no capacity for maintaining it as a first-party
component of the Rust SDK.
2023-09-05 15:40:38 +02:00
Benjamin Bouvier
11b3be1a03
feat(notification client): always retry decryption if it failed before
...
Now that we can decrypt on both of {single|multi} process setups (i.e. available for both android
and ios), we can enable retrying decrypting notifications by default.
2023-09-05 14:17:41 +02:00
Benjamin Bouvier
f13adb24dd
feat(sync service): enable the encryption sync by default
2023-09-05 14:17:41 +02:00
Benjamin Bouvier
94cfa9fc12
chore(tests): move check_requests from encryption_sync_service to sliding_sync helper file
2023-09-05 14:17:41 +02:00
Benjamin Bouvier
3d89d750fb
chore: rename EncryptionSync to EncryptionSyncService
2023-09-05 14:17:41 +02:00
Benjamin Bouvier
242c5bcb37
chore(ui): move xyz/mod.rs to xyz.rs for the encryption_sync and sync_service
2023-09-05 14:17:41 +02:00
Benjamin Bouvier
d6f0635023
chore: clippy + review feedback
2023-09-05 11:17:14 +02:00
Benjamin Bouvier
ea2826aac6
chore(FFI): update bindings for changes to the NotificationClient builder
2023-09-05 11:17:14 +02:00
Benjamin Bouvier
508091af80
feat: use the encryption sync permit from the SyncService in the NotificationClient
...
Also rejigger the parameters passed to the notification client builder, so that it's always required to pass
a process setup. With that, we're one step closer to removing the retry_decryption() function and enable it
by default.
2023-09-05 11:17:14 +02:00
Benjamin Bouvier
de9b6d25cd
feat: have the SyncService own the EncryptionSyncPermit and add try_get_encryption_sync_permit
2023-09-05 11:17:14 +02:00
Benjamin Bouvier
9469b77741
feat: add an EncryptionSyncPermit object allowing to use an EncryptionSync
...
The comment above the type should help understanding what it is about.
2023-09-05 11:17:14 +02:00
Jonas Platte
06ec19b50b
ui: Add test for transfering reply details
2023-09-05 10:39:48 +02:00
Jonas Platte
bd99c5e72b
ui: Transfer reply details from old to new item when receiving dup event
2023-09-05 10:39:48 +02:00
Jonas Platte
bdddb0ce7a
ui: Move reply test into a separate module
2023-09-05 10:39:48 +02:00
Jonas Platte
73a9cd40d3
sdk: Remove warning about event without txn ID
...
… it doesn't make sense to have as long as it's still very common to get
duplicate non-echo events from the SS proxy.
2023-09-05 10:39:48 +02:00
Ivan Enderlin
465c9bcbed
test(ui): Test Timeline is reset when a user is ignored/unignored.
2023-09-04 17:39:02 +02:00
Jonas Platte
4f2477fbe8
ui: Reset the timeline when ignore user list changes
2023-09-04 17:39:02 +02:00
Ivan Enderlin
cf419566e8
feat(ui): TimelineInnerStateLock::lock is replaced by ::read and ::write
...
feat(ui): `TimelineInnerStateLock::lock` is replaced by `::read` and `::write`
2023-09-04 15:44:13 +02:00
Damir Jelić
e835d9a1cc
The export_room_key method does not encrypt the room keys nor does it panic
2023-09-04 15:39:10 +02:00
Ivan Enderlin
91784ded72
feat(ui): TimelineInnerStateLock::lock is replaced by read and write.
...
The `Timeline` batches its updates to its subscribers (e.g. a client app,
like Element X). A batch is built every time the inner state lock of
the `Timeline` is released. On the paper, it's nice; in practise, even
a read operation on the `Timeline` leads to building a new batch. This
is inefficient and consumes resources (like CPU cycles, FFI boundary
crossings, memory allocations etc.) even if there is no update to put in
the batch: this will just batch empty updates.
To avoid that, one needs to make the difference between read or write
operations onto the inner state. Only the write operations will fire a
batch.
This patch splits the `TimelineInnerStateLock::lock` method into
`::read` and `::write`. The idea is that a read-only lock doesn't
hold a clone of the lock release observer (`lock_release_ob:
SharedObservable<()>`), it will not notify the observer. Then it's only
the write lock that holds a clone of the lock release observer, and will
notify it.
This patch updates the code accordingly as best as possible.
2023-09-04 15:05:52 +02:00
Benjamin Bouvier
e8e7738dfa
chore: introduce fail! macro to avoid repetitive work
2023-09-01 16:06:46 +02:00
Benjamin Bouvier
2d5f5879ab
chore: remove spurious clone
2023-09-01 16:06:46 +02:00
Benjamin Bouvier
0162e62feb
fix: don't save the latest_id_token upon refresh (thanks @zecakeh!)
2023-09-01 16:06:46 +02:00
Benjamin Bouvier
d37656d9f0
chore: use a hash() function instead of hashing manually
2023-09-01 16:06:46 +02:00
Benjamin Bouvier
5451d39ba3
chore: move notification within the refresh_access_token_inner function
2023-09-01 15:15:02 +02:00
Benjamin Bouvier
a17a7608f3
chore: add more focused logs for OIDC
2023-09-01 15:15:02 +02:00
Benjamin Bouvier
4cdef7255e
fix: save the OIDC refresh token from the response (!)
2023-09-01 15:15:02 +02:00
Jonas Platte
2b18a02488
ffi: Use avatar_url from sliding sync for RoomInfo where applicable
2023-09-01 10:47:48 +02:00
Jonas Platte
db565fcff3
ci: Improve caching for matrix-rust-components-swift and tarpaulin
2023-09-01 10:43:52 +02:00
Jonas Platte
e02676616f
sdk: Make use of clonable FnOnce in event handlers
2023-09-01 10:42:22 +02:00
Jonas Platte
a6b4e04181
sdk: Revert observable diff buffer capacity change
2023-09-01 10:06:07 +02:00
Benjamin Bouvier
d060ec2830
chore: add e2e-encryption cfg guards
2023-08-31 16:08:45 +02:00
Benjamin Bouvier
51dcdac46d
TERRIBLE HACK: save the pos value in the crypto store
2023-08-31 16:08:45 +02:00
Benjamin Bouvier
be3616c6b2
chore: rename restore_pos_from_database to share_pos
2023-08-31 16:08:45 +02:00
Benjamin Bouvier
05a8343d03
chore: rename previous_pos to pos
2023-08-31 16:08:45 +02:00
Benjamin Bouvier
28d25882c2
chore: fmt + clippy
2023-08-31 16:08:45 +02:00
Benjamin Bouvier
5eb455032e
tests: add test and maintain property that in-memory pos == db pos at all times
2023-08-31 16:08:45 +02:00
Benjamin Bouvier
6b84d03e2f
feat(encryption sync): restore the stream position from the database
2023-08-31 16:08:45 +02:00
Benjamin Bouvier
08b9f0640c
feat: add a new sliding sync option to restore the stream position from the database
2023-08-31 16:08:45 +02:00
Benjamin Bouvier
4b67a6608e
feat: persist previous pos when saving/restoring a sliding sync
2023-08-31 16:08:45 +02:00
Benjamin Bouvier
941ecbfe0d
chore: refactor fields restored by restore_sliding_sync_state
2023-08-31 16:08:45 +02:00
Ivan Enderlin
719cbee96e
feat(ui): Fine-tuning RoomList again
...
feat(ui): Fine-tuning `RoomList` again
2023-08-31 12:57:27 +02:00
Benjamin Bouvier
11404010e6
chore: disable colors for logging in FFI for logcat and stdout too
2023-08-31 12:13:25 +02:00
Ivan Enderlin
4b04f15bc5
chore(ui): Naming is hard :-).
2023-08-31 12:04:14 +02:00
Doug
7e71c79072
chore(sdk): Log the OIDC refresh token (hashed). ( #2486 )
...
* chore(sdk): Log the OIDC refresh token (hashed).
* chore(sdk): Fix Clippy and PR comments.
2023-08-31 09:25:46 +00:00