Jorge Martín
2bd4db8a23
sdk-ui: use PinnedEventsLoader::update_if_needed when new timeline events are received. Using PinnedEventsLoader::load_events here was a mistake.
2024-08-02 18:54:28 +02:00
Jorge Martín
4de1375a76
ffi: add bindings for Room::clear_pinned_events_cache
2024-08-02 18:54:28 +02:00
Jorge Martín
1353406b80
sdk-ui: add Room::clear_pinned_events_cache to remove any cached pinned events from a room
2024-08-02 18:54:28 +02:00
Jorge Martín
e1bffaee21
sdk: add PinnedEventCache::remove_bulk to be able to remove events from the cache
2024-08-02 18:54:28 +02:00
Jorge Martín
0496ef4313
sdk-ui: add test checking the pinned event cache is kept for different room instances
2024-08-02 18:54:28 +02:00
Jorge Martín
674605aeab
sdk-ui: use the moved PinnedEventCache instead of the one encapsulated in PinnedEventsLoader
2024-08-02 18:54:28 +02:00
Jorge Martín
f1b20a8ea5
sdk: add PinnedEventCache to Client.
...
This ensures the cache keeps the events even when the associated `Room` is dropped, which is what we want when using it to cache the pinned events for rooms in the client.
Add `fn Client::pinned_event_cached()` to get a reference to it.
2024-08-02 18:54:28 +02:00
Jorge Martín
d1fe27c969
sdk: move PinnedEventCache from sdk-ui
2024-08-02 18:54:28 +02:00
Jorge Martín
769a627496
ci: try fixing the kotlin bindings tests by using NDK 27
2024-08-02 17:28:36 +02:00
Timo
aff7aefd28
WidgetDriver: don't specify the length of the serializer. Its not needed for the json serializer.
2024-08-02 15:14:09 +01:00
Timo
d60b9d3da2
Changelog: Add delayed event to the widget driver.
...
Also mention the breaking change in the public widget capabilities interface.
2024-08-02 15:14:09 +01:00
Timo
8d5dc18dd3
IntegrationTests: Add integration tests for the WidgetDriver delayed events.
2024-08-02 15:14:09 +01:00
Timo
49790c9f91
WidgetDriver: wire up everything in the widget process action handler.
2024-08-02 15:14:09 +01:00
Timo
2e8b135859
WidgetDriver: Add interacting with delayed event to the matrix driver.
...
In `matrix.rs` we add methods to interact with the matrix homeserver. And in `machine/mod.rs` we implement the widgetMachine cases for handling (checking capabilities and using the matrixDriver) delayed events.
2024-08-02 15:14:09 +01:00
Timo
7614bfb716
WidgetDriver: Introduce new capabilities for sending and updating delayed events.
...
Those capabilities are also exposed to the FFI.
+ related tests
2024-08-02 15:14:09 +01:00
Timo
0407dd7eb1
WidgetDriver: Introduce new Delay Event update widget action types.
...
Also update the naming from `future` to `delay` in existing types.
2024-08-02 15:14:09 +01:00
Timo
16a638400c
chore: Update ruma to a version supporting authenticated delayed events.
2024-08-02 15:14:09 +01:00
torrybr
be6bc444f8
chore: fix formatting
2024-08-02 15:42:54 +03:00
torrybr
36091a9ef3
sdk: refactor beacon_info tests into their own folder
2024-08-02 15:42:54 +03:00
Stefan Ceriu
1160383d71
sdk: fix identity reset not actually disabling backups when not enabled locally, resulting in conflicts and failing to correctly setup the newly reset session
2024-08-02 15:25:42 +03:00
Stefan Ceriu
d7f3914673
sdk: throw an error instead of silently failing when disabling backups if they weren't previously enabled locally
...
- also change back the state from `disabling` to `unknown`
2024-08-02 15:25:42 +03:00
Jorge Martín
1ca4377baf
ffi: add FFI bindings for creating the new pinned events focused timeline
2024-08-02 13:11:24 +02:00
Jorge Martín
ab12f2f7ca
sdk-ui: add and fix tests
2024-08-02 13:11:24 +02:00
Jorge Martín
6889430474
benchmark: add a benchmark to measure how loading pinned events performs
2024-08-02 13:11:24 +02:00
Jorge Martín
382c573973
sdk-ui: add TimelineFocus::PinnedEvents and TimelineFocusData::PinnedEvents to load the live pinned events for a room.
...
Add `PinnedEventsLoader` to encapsulate this logic, being able to provide a max number of events to load and how many can be loaded at the same time. Also implement an event cache for it.
Add `PinnedEventsRoom` trait to use it in the same way as `PaginableRoom`, only for pinned events.
2024-08-02 13:11:24 +02:00
Jorge Martín
643c9a0b8e
sdb-base: add methods for getting the pinned event ids of a Room as a stream and checking whether an event is pinned in the room or not
2024-08-02 13:11:24 +02:00
Kévin Commaille
689bf9b4dc
base-sdk: Properly update direct targets of rooms with m.direct event
...
The code used to only add new targets to rooms
but never remove the ones that are not in the event anymore.
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr >
2024-08-02 12:46:37 +02:00
Richard van der Hoff
21efd60dba
crypto: clarify/expand comments in Device::is_owner_of_session
...
I found some of this comment a bit hard to grok, so I've expanded it a
bit. Hope it's clear to others.
2024-08-02 10:04:08 +02:00
Valere
0850c0c1c9
feat(crypto): Add support for master key local pinning ( #3639 )
...
This patch ensures that we retain the master key for a given UserIdentityData object, even when a new and different identity arrives via the `/keys/query` endpoint. This concept, called pinning, is similar to certificate pinning in web browsers.
Retaining the master key allows us to detect changes and notify the user accordingly.
2024-08-02 09:13:14 +02:00
Doug
aee8728418
sdk-ui: Fix a bug where local echoes were showing unencrypted shields.
2024-08-01 14:28:33 +03:00
Kevin Boos
7c5c5a8f30
timeline: re-export ReactionsByKeyBySender and ReactionInfo types ( #3787 )
...
This tiny change allows one to easily name the return type of
`EventTimelineItem::reactions()` such that you can use it in a function
signature. Same goes for the `ReactionInfo` type.
I think this was likely just a small oversight in recent changes to the
reactions API, so hopefully it's not controversial.
Without this, it's impossible to write a function that uses
`ReactionsByKeyBySender` or `ReactionInfo` in the signature.
Signed-off-by: Kevin Boos <kevinaboos@gmail.com >
2024-08-01 11:37:16 +01:00
Stefan Ceriu
bfa069d6c0
Merge pull request #3783 from matrix-org/doug/sent-in-clear
...
UI Timeline: Build a ShieldState for an unencrypted event in an encrypted room.
2024-08-01 11:47:52 +03:00
Doug
de502f42c6
chore: Add docs & todo on EventTimelineItem::from_latest_event
2024-07-31 19:08:31 +01:00
Doug
dc1a34cd56
chore: Fix tests.
2024-07-31 15:51:40 +01:00
Doug
11a26d7fc4
chore: Make the room encryption state optional on timeline items.
2024-07-31 14:45:00 +01:00
Doug
1abbaa8607
ui: Add tests for Sent In Clear shield.
2024-07-31 13:06:36 +01:00
Doug
bae0f304f7
ui: Add a ShieldState for "Sent in clear".
2024-07-31 13:06:36 +01:00
Andy Balaam
25df9a11c5
crypto: Rename OlmMachine::get_or_update_verification_state
2024-07-31 12:27:30 +01:00
Andy Balaam
1f937278b2
crypto: Store the updated SenderData in the store when we calculate it
2024-07-31 12:27:30 +01:00
Andy Balaam
e2ff2daf5d
crypto: Extract a function to convert SenderData->VerificationState
2024-07-31 12:27:30 +01:00
Damir Jelić
8760ea8440
chore: Update the bytemuck crate
2024-07-31 10:40:23 +02:00
Andy Balaam
d03d3cff17
crypto: Remove unused retry_details from SenderData
2024-07-30 14:34:23 +01:00
Andy Balaam
f88c6dff4d
crypto: Use SenderDataFinder to implement get_verification_state
...
This avoids repeating equivalent code.
2024-07-30 13:50:58 +01:00
Andy Balaam
d3835bb992
crypto: Return an error if is_owner_of_session fails
2024-07-30 13:50:58 +01:00
Andy Balaam
93a0fe500b
crypto: Provide specific error types for SenderDataFinder
2024-07-30 13:50:58 +01:00
Andy Balaam
1f369c5912
crypto: Support a mismatched identity variant in session creation errors
2024-07-30 13:50:58 +01:00
Andy Balaam
2289c813f1
crypto: Allow testing SenderDataFinder with imported sessions
2024-07-30 13:50:58 +01:00
Andy Balaam
0a9431d01d
crypto: Do not provide device ID to EncryptionInfo when device is not the owner
2024-07-30 13:50:58 +01:00
Stefan Ceriu
f51eebb55f
Merge pull request #3759 from matrix-org/stefan/crypto-identity-reset
...
ffi: add high level method for resetting the user's identity and deleting all associated secrets
2024-07-30 13:29:01 +03:00
Stefan Ceriu
8895e532bb
Handle the situation where the backend skips user interactive authentication
...
- disable backups and recovery before requesting the reset handle
- attempt device key upload
- re-enable backups both when UIAA is required and when not
2024-07-30 13:13:26 +03:00