Commit Graph

13445 Commits

Author SHA1 Message Date
multi prise
abecb33e34 Lint code 2025-09-24 12:35:17 +02:00
multi prise
b26ce417f0 Add comments documenting the new structure 2025-09-24 12:35:17 +02:00
multi prise
5a1bd54bb1 Implement use of Zeroizing struct for string 2025-09-24 12:35:17 +02:00
multi prise
0d0e2aa472 Add ZeroiseOnDrop trait to secret and make the key a Box 2025-09-24 12:35:17 +02:00
multi prise
88ed0afcb3 Replace missing line 2025-09-24 12:35:17 +02:00
multi prise
9938ab8b1f Reimplement previous tests for the store and on top of the one testing the opening with a key 2025-09-24 12:35:17 +02:00
multi prise
eed7384934 Remove some superfluous change 2025-09-24 12:35:17 +02:00
multi prise
32255cd178 Update changelog 2025-09-24 12:35:17 +02:00
multi prise
c51536a054 reformat 2025-09-24 12:35:17 +02:00
multi prise
6099928b40 Remove conditional logic for running tests 2025-09-24 12:35:17 +02:00
multi prise
fac1f295b2 Correct wrong borrow 2025-09-24 12:35:17 +02:00
multi prise
24d02a72e3 implement zeroizing of secrets after use 2025-09-24 12:35:17 +02:00
multi prise
2a073043fd Revert "Use of lifetime in order to not clone/copy the data"
This reverts commit 009ee3a0e5fdff1332aaf0b1e62ab2577d728b82.
2025-09-24 12:35:17 +02:00
multi prise
c5b35209b3 Revert "Update matrix-sdk with new lifetimes"
This reverts commit 3a8f5f110cd755158e3a5605a282556da6060417.
2025-09-24 12:35:17 +02:00
multi prise
8e759befd3 Refactorize tests config to correspond with the new api 2025-09-24 12:35:17 +02:00
multi prise
9faffa5b10 Temporary comment insecure function 2025-09-24 12:35:17 +02:00
multi prise
31200357a0 Update matrix-sdk with new lifetimes 2025-09-24 12:35:17 +02:00
multi prise
75b8c9fe93 Use of lifetime in order to not clone/copy the data 2025-09-24 12:35:17 +02:00
multi prise
004d98230c Uncomment the config directives and allows test to run faster by usinf an insecure export function 2025-09-24 12:35:17 +02:00
multi prise
eb37a0d2e1 Update some expect text to make sure they reflect the use of secret instead of a only a key to encrypt a store 2025-09-24 12:35:17 +02:00
multi prise
8a0e61e95b correct comment on the state store file 2025-09-24 12:35:17 +02:00
multi prise
a2e2765298 correct comment on the crypto store file 2025-09-24 12:35:17 +02:00
multi prise
6e1e0981b1 remove typo 2025-09-24 12:35:17 +02:00
multi prise
b2120a8f3d Update changelog to represent changes 2025-09-24 12:35:17 +02:00
multi prise
5d169ae765 Comment the use 2025-09-24 12:35:17 +02:00
multi prise
34dd7ea3cd Revert get_or_create_store_cypher to use 2025-09-24 12:35:17 +02:00
multi prise
4930c589a8 Refactorize SqliteStoreConfig::key and SqliteStoreConfig::passphrase method 2025-09-24 12:35:17 +02:00
multi prise
f6d2e73cab More reformarting of files 2025-09-24 12:35:17 +02:00
multi prise
2bd5ec30d1 Correct some tests 2025-09-24 12:35:17 +02:00
multi prise
425b502977 Format files 2025-09-24 12:35:17 +02:00
multi prise
0dfecd78d6 Updated the store encryption to use a enum Secret instead of passphrase 2025-09-24 12:35:17 +02:00
multi prise
4754ac2cbf Updated changelog 2025-09-24 12:35:17 +02:00
multi prise
72bb452b5b Remove all passphrase mention 2025-09-24 12:35:17 +02:00
multi prise
c17dbf9ebe Replace the passphrase logic with a key logic in the implementation of encrypted store 2025-09-24 12:35:17 +02:00
multi prise
5fd7c9e179 Add the key logic to the SqliteStoreConfig struct 2025-09-24 12:35:17 +02:00
Hubert Chathi
840ce43fed Add function to check if the user has another device to verify against (#5699)
Part of the fix for
https://github.com/element-hq/element-x-android/issues/4864 and
https://github.com/element-hq/element-x-ios/issues/4190

Allows applications to determine whether the user can verify against
another device in order to cross-sign their new device.
2025-09-24 11:31:42 +01:00
Benjamin Bouvier
e71d565346 test: add a test for is_threaded when the focused timeline points to an in-thread event 2025-09-23 17:43:22 +02:00
Benjamin Bouvier
5a06f5f351 test: use a RoomContextResponseTemplate builder pattern to create responses to /context 2025-09-23 17:43:22 +02:00
Benjamin Bouvier
1e01e3fc62 refactor(timeline): don't allocate a vector for the in-thread events when initially loading a thread permalink 2025-09-23 17:43:22 +02:00
Jorge Martín
bcba5f4571 chore(doc): Add changelogs 2025-09-23 14:13:34 +02:00
Jorge Martín
7736b50c04 fix(ui): Fix tests again.
The wrong pair of 'from' tokens were used for the forward paginations in the unit test
2025-09-23 14:13:34 +02:00
Jorge Martín
6e1dc121a5 fix(sdk+ui): Expose TimelineController::focus so the right backwards pagination case is used for focused thread pagination
Before, the same pagination as for the live thread timeline was used by mistake.

Fix the tests and check the right tokens are used for `/relations`.
2025-09-23 14:13:34 +02:00
Jorge Martín
08f0200174 refactor(sdk): Use .expect to unwrap the AnyPaginator, remove PaginationError::NotInstantiated
Also, improve the legibility of some usages
2025-09-23 14:13:34 +02:00
Jorge Martín
eda561e00e refactor(ffi): Replace derefs and add doc comment to thread_root_event_id 2025-09-23 14:13:34 +02:00
Jorge Martín
578320cefc fix(sdk): Make sure we only include the events received from the /context request that are part of the thread in the case where the event focus is for a threaded event
Modify the tests and mocks so this filtering is checked.
2025-09-23 14:13:34 +02:00
Jorge Martín
59ed28d3f8 refactor(sdk): add several helper functions to the AnyPaginator wrapper, use them where needed
Move `hide_threaded_events` from `TimelineEventFocusKind::Event` to `AnyPaginator::Unthreaded`
2025-09-23 14:13:34 +02:00
Jorge Martín
a0eecac8e0 chore(doc): Fix ThreadedEventsLoader::paginate_forwards docs 2025-09-23 14:13:34 +02:00
Jorge Martín
27ba6d070b feat(ffi): Expose TimelineEvent::thread_root_event_id 2025-09-23 14:13:34 +02:00
Jorge Martín
14ca34b09b feat(ffi): Add Room::load_or_fetch_event to the FFI layer
This way we can retrieve random events in a room and check their properties - this is needed to decide whether a permalink for an event should open in a thread or not
2025-09-23 14:13:34 +02:00
Jorge Martín
2166de7b0d refactor(sdk+ui): Make TimelineFocus::Event { paginator } generic
This way we can have the same focus handling both the focused event pagination in the main timeline with the `Paginator` and the focused event pagination in a thread with `EventThreadsLoader`.

The actual paginator is populated in `TimelineController::init_focus` after we call `/context` and can check if the event is part of a thread.
2025-09-23 14:13:34 +02:00