Damir Jelić
c3848ca016
crypto: Update the changelog
2024-08-06 15:10:13 +02:00
Damir Jelić
a74f6bcc3f
Add the Olm Session cache back in the CryptoStoreWrapper
2024-08-06 15:10:13 +02:00
Damir Jelić
ba7fb7fc36
Convert all SessionStore locks to be async locks
2024-08-06 15:10:13 +02:00
Damir Jelić
96b615ba8e
Remove Olm Session cache from the individual crypto store implementations
2024-08-06 15:10:13 +02:00
Jorge Martín
c83fa3a532
sdk-ui: move conversion between Content::RoomPinnedEvents from ffi to sdk-ui
2024-08-06 10:37:18 +02:00
Jorge Martín
d509d79472
ffi: add RoomPinnedEventsChange and a diffing step to know what happened in the last pinning/unpinning events action
2024-08-06 10:37:18 +02:00
Andy Balaam
ffba842919
crypto: Don't recalculate SenderData if the sender is known but not verified
2024-08-06 09:34:21 +01:00
Jorge Martín
91c10ae213
sdk-ui: add PinnedEventsLoaderError::TimelineReloadFailed.
...
This error will be returned when the room has pinned event ids but the timeline couldn't load any of them.
Also fix tests.
2024-08-05 16:56:49 +02:00
Andy Balaam
efdd6d2693
crypto: Use most-trusted SenderData available when decrypting
2024-08-05 15:46:08 +01:00
Andy Balaam
08bc563e9e
crypto: Methods on SenderData for comparing trust level
2024-08-05 15:46:08 +01:00
Jorge Martín
71b5ab4d07
sdk-ui: fix pinned_events tests
2024-08-05 14:31:03 +02:00
Jorge Martín
4569b25d98
bench: fix benchmark by adding encryption event and clearing the cache in each iteration
2024-08-05 14:31:03 +02:00
Jorge Martín
9f7f1a98fb
ffi: base the ffi::Room::clear_pinned_events method in sdk::Room::clear_pinned_events
2024-08-05 14:31:03 +02:00
Jorge Martín
4432b332fa
sdk: add Room::clear_pinned_events
2024-08-05 14:31:03 +02:00
Jorge Martín
d846563df3
sdk-ui: use reversed chronological order for TimelineFocus::PinnedEvents
2024-08-05 14:31:03 +02:00
Doug
b453a0204e
sdk-ui: Make the SentInClear shield red.
2024-08-05 10:48:06 +02:00
Doug
4c220ed030
shields: Put the Code inside the Colour instead of the Colour inside the Code.
2024-08-05 10:48:06 +02:00
Doug
037badf7a4
chore: Strongly typed ShieldStates.
2024-08-05 10:48:06 +02:00
Jorge Martín
fba61751d5
sdk-ui: extract MAX_CONCURRENT_REQUESTS const for PinnedEventsLoader
2024-08-02 18:54:28 +02:00
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