Valere
d4b9145bc2
Merge pull request #4105 from matrix-org/valere/crypto_ffi_expose_verification_violation
...
crypto-ffi: Expose `has_verification_violation` for `UserIdentity`
2024-10-31 11:32:46 +01:00
Valere
49f7fe90a9
crypto-ffi: Expose has_verification_violation for UserIdentity
2024-10-31 11:04:42 +01:00
Kévin Commaille
75683d268f
refactor(crypto)!: Remove unused OneTimeKey::Key and SessionCreationError::OneTimeKeyUnknown variants
...
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr >
2024-10-30 17:13:47 +01:00
Ivan Enderlin
71abbeb1f1
test(sdk): Use EventFactory to simplify the test cases.
2024-10-30 15:28:38 +01:00
Ivan Enderlin
fe79826c7a
feat(sdk): Find and remove duplicated events in RoomEvents.
...
This patch uses the new `Deduplicator` type, along with
`LinkeChunk::remove_item_at` to remove duplicated events. When a new
event is received, the older one is removed.
2024-10-30 15:28:38 +01:00
Ivan Enderlin
7d64ea1bbc
feat(sdk): Introduce event_cache::Deduplicator.
...
This patch introduces `Deduplicator`, an efficient type to detect
duplicated events in the event cache. It uses a bloom filter, and
decorates a collection of events with `Decoration`, which an enum that
marks whether an event is unique, duplicated or invalid.
2024-10-30 15:28:38 +01:00
Kévin Commaille
5158b39277
refactor!: Upgrade Ruma to 0.11.0
...
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr >
2024-10-30 09:42:19 +01:00
Benjamin Bouvier
be88e0ad69
feat(event cache store): Implement renaming media keys
2024-10-29 18:15:28 +01:00
Benjamin Bouvier
50473ba1a8
chore(ring buffer): prefix all tests with test_ in this file
2024-10-29 18:15:28 +01:00
Benjamin Bouvier
5d828d234e
feat(ring buffer): implement RingBuffer::iter_mut()
2024-10-29 18:15:28 +01:00
Benjamin Bouvier
9c858c1208
refactor(base): rename all send-queue related "events" to "requests"
...
Changelog: Renamed all the send-queue related "events" to "requests", so
as to generalize usage of the send queue to not-events (e.g. medias,
redactions, etc.).
2024-10-29 18:15:10 +01:00
Benjamin Bouvier
58d46f015b
refactor(base): add a QueuedRequestKind enum
...
In a next commit, the `QueuedEvent` will be renamed to `QueuedRequest`.
This specifies which kind of request we want to send with the send
queue; for now, it can only be an event.
2024-10-29 18:15:10 +01:00
Benjamin Bouvier
4cbd18cb37
refactor(base): move all send-queue related types to a new store::send_queue module
...
No changes in functionality, only code motion.
2024-10-29 18:15:10 +01:00
Benjamin Bouvier
888f992df0
refactor(base): Renamed StateStore::list_dependend_send_queue_events to load_dependent_send_queue_events
2024-10-29 18:15:10 +01:00
Kévin Commaille
ee80291c41
chore: Never skip breaking changes with git-cliff
...
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr >
2024-10-29 17:33:01 +01:00
Ivan Enderlin
de3a667eb9
chore: Add an empty line between struct fields.
2024-10-29 17:21:34 +01:00
Andy Balaam
ce9dc73376
doc(crypto) Crypto changelog documenting VerificationRequestState::Transitioned interface change
2024-10-29 12:08:46 +00:00
Jorge Martín
03535832ec
refactor(room): remove sdk::Room::room_power_levels function
...
This has been replaced by `sdk_base::Room::power_levels`, which can also be used from `sdk::Room`
2024-10-29 12:55:39 +01:00
Jorge Martín
c143f981bd
refactor(room_list): only display the knock state events if the current user can act on them
...
That is, if their power level allows them to either invite or kick users.
2024-10-29 12:55:39 +01:00
Jorge Martín
f4a18989fb
feat(room_list): allow knock state event as latest_event
...
This allows clients to display pending knocking requests in the room list items.
2024-10-29 12:55:39 +01:00
Ivan Enderlin
6752cf73df
test(sdk): Move tests into their correct module.
2024-10-29 10:52:14 +01:00
Ivan Enderlin
e87bed8ef4
chore(sdk): Move all RoomEventCache types from mod.rs to room/mod.rs.
2024-10-29 10:52:14 +01:00
Ivan Enderlin
2f19e2b762
chore(sdk): Rename event_cache/store.rs to event_cache/room/events.rs.
...
This patch renames the `store.rs` file to `room/events.rs`.
2024-10-29 10:52:14 +01:00
Ivan Enderlin
b66024c386
test: Update Synapse from 1.115 to 1.117.
...
This patch updates Synapse in our CI infrastructure and in the
`matrix-sdk-integration-testing` crate.
2024-10-29 10:50:26 +01:00
Ivan Enderlin
c48bb13159
doc: Deal with paragraphes in trailers ( #4179 )
...
Git trailers have a funny format.
---------
Signed-off-by: Ivan Enderlin <ivan@mnt.io >
Co-authored-by: Benjamin Bouvier <public@benj.me >
2024-10-29 09:39:42 +00:00
Andy Balaam
5f0ba1e7df
refactor(crypto) Avoid msk and ssk abbreviations in test data
2024-10-28 16:35:39 +00:00
Andy Balaam
91fa1669be
refactor(crypto) Rename device methods in IdentityChangeDataSet to match identity names
2024-10-28 16:35:39 +00:00
Andy Balaam
a1a4ce0a95
refactor(crypto) Tidy IdentityChangeDataSet test data
2024-10-28 16:35:39 +00:00
Andy Balaam
131921c045
fix(tests) Increase a test timeout to fix occasional flakes I saw locally
2024-10-28 16:35:39 +00:00
Ivan Enderlin
b62661bc70
feat(sdk): Map Update::RemoveItem into VectorDiff::Remove in UpdateToVectorDiff.
...
This patch implements the support of `Update::RemoveItem` inside
`UpdateToVectorDiff` to emit a `VectorDiff::Remove`.
2024-10-28 17:17:01 +01:00
Ivan Enderlin
e0be1e8e32
fix(sdk): Fix a bug in an optimisation of UpdatetoVectorDiff.
...
This patch fixes a bug in an optimisation inside `UpdateToVectorDiff`
when an `Update::PushItems` is handled. It can sometimes create
`VectorDiff::Append` instead of a `VectorDiff::Insert`. The tests will
be part of the next patch.
2024-10-28 17:17:01 +01:00
Ivan Enderlin
c23c3b9558
chore(sdk): Rename a couple of variables.
...
This is another clean up patch.
2024-10-28 17:17:01 +01:00
Ivan Enderlin
ca3d5693b4
chore(sdk): Rename a couple of variables.
...
This is a clean up patch, nothing fancy.
2024-10-28 17:17:01 +01:00
Ivan Enderlin
135c448f2d
chore(sdk): Extract code into a map_to_offset method.
...
This is only code move, nothing has changed.
2024-10-28 17:17:01 +01:00
Ivan Enderlin
01cbce907c
feat(sdk): Add LinkedChunk::remove_item_at.
...
This patch adds the `LinkedChunk::remove_item_at` method, along with
`Update::RemoveItem` variant.
2024-10-28 17:17:01 +01:00
Stefan Ceriu
df4a5c36fc
Pass the DeviceData in between the Ready and Transitioned states instead of fetching it from the store.
2024-10-28 17:04:50 +02:00
Stefan Ceriu
8492968792
Pass a copy of the other DeviceData in between the (Requested, Ready) and (Created, Ready) states
2024-10-28 17:04:50 +02:00
Stefan Ceriu
d31f5b2a72
chore(tests): fix verification integration tests following changes to the data associated with VerificationRequestState::Requested
2024-10-28 17:04:50 +02:00
Stefan Ceriu
8469cb1146
fix(crypto): fix incorrect VerificationMachine tests
...
- the tests used to incorrectly wrap the to-device content into an event as if it was sent by alice instead of bob
2024-10-28 17:04:50 +02:00
Stefan Ceriu
bb8b0cf6b9
Expose requesting device details to the final client
2024-10-28 17:04:50 +02:00
Stefan Ceriu
35dabf7346
feat(crypto): store a copy of the requesting DeviceData within VerificationRequestStates
2024-10-28 17:04:50 +02:00
Stefan Ceriu
f771eec3c5
Fix a clippy warning re single matching
2024-10-28 17:04:50 +02:00
Stefan Ceriu
6455585f1e
Documentation + cleanup
2024-10-28 17:04:50 +02:00
Stefan Ceriu
3a34b03726
Expose mechanism for registering to verification updates before actually accepting one
...
- allows handling remote cancellations on verification requests that have not yet been accepted
2024-10-28 17:04:50 +02:00
Stefan Ceriu
8cf0716db2
refactor(ffi): switch to using VerificationRequest::changes instead of direct to_device events.
2024-10-28 17:04:50 +02:00
Stefan Ceriu
660a305cfa
feat(ffi): add support for receiving and working with session verification requests
...
fixup! feat(ffi): add support for receiving and working with session verification requests
2024-10-28 17:04:50 +02:00
dependabot[bot]
b2af1eeb20
chore(deps): bump crate-ci/typos from 1.26.0 to 1.26.8
...
Bumps [crate-ci/typos](https://github.com/crate-ci/typos ) from 1.26.0 to 1.26.8.
- [Release notes](https://github.com/crate-ci/typos/releases )
- [Changelog](https://github.com/crate-ci/typos/blob/master/CHANGELOG.md )
- [Commits](https://github.com/crate-ci/typos/compare/v1.26.0...v1.26.8 )
---
updated-dependencies:
- dependency-name: crate-ci/typos
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-10-28 15:36:15 +01:00
Ivan Enderlin
77b3aa8124
test(sdk): Test the RoomEvents' methods.
...
This patch adds unit tests for the `RoomEvents`' methods.
2024-10-28 13:30:35 +01:00
Ivan Enderlin
cf7cb5c350
doc(sdk): Add more documentation for RoomEvents.
2024-10-28 13:30:35 +01:00
Ivan Enderlin
ac7bc6461f
chore(sdk): Add an Event type alias for the sake of convenience.
...
This patch adds an `Event` type alias to `SyncTimelineEvent` to (i) make
the code shorter, (ii) remove some cognitive effort, (iii) make things
more convenient.
2024-10-28 13:30:35 +01:00