Andy Balaam
e85e50b185
crypto: Provide DerefMut on OwnUserIdentity and UserIdentity
2024-10-03 13:24:24 +01:00
Erik Johnston
c9fd5a0787
Do not log full keys query response which can be very large ( #4065 )
...
Signed-off-by: Erik Johnston <erikj@jki.re >
Co-authored-by: Damir Jelić <poljar@termina.org.uk >
2024-10-03 10:42:43 +00:00
Valere
6de676f491
Merge pull request #4046 from matrix-org/valere/trust_decoration_decryption_trust_req
...
crypto: Expose with_decryption_trust_requirement for ClientBuilder
2024-10-02 12:13:15 +02:00
Benjamin Bouvier
06f60e3b62
base: rename account_data to account_data_processor and other review comments
2024-10-02 11:58:09 +02:00
Benjamin Bouvier
96765cad28
base: add helper to process data on a room info from state changes or store
2024-10-02 11:58:09 +02:00
Benjamin Bouvier
4f265ccd22
base: move processing of the direct room inside the AccountDataProcessor
2024-10-02 11:58:09 +02:00
Benjamin Bouvier
759a9b0e18
base: make the dependency to push rules explicit when processing a room's subpart of a response
2024-10-02 11:58:09 +02:00
Benjamin Bouvier
0a854cdbf7
base: get rid of StateChanges::add_account_data
2024-10-02 11:58:09 +02:00
Benjamin Bouvier
40e6e9f028
base: avoid double-contains check in apply_changes
...
Calling `contains_key` and then doing `if let Some() = .get` have the
same effect.
2024-10-02 11:58:09 +02:00
Benjamin Bouvier
8f4fcf6299
base: experiment with handling global account data as a separate processor
2024-10-02 11:58:09 +02:00
Benjamin Bouvier
2283c28503
base: tidy up sliding sync code around e2ee
2024-10-02 11:58:09 +02:00
dependabot[bot]
59d3608c32
chore(deps): bump actions/checkout from 2.0.0 to 4.2.0
...
Bumps [actions/checkout](https://github.com/actions/checkout ) from 2.0.0 to 4.2.0.
- [Release notes](https://github.com/actions/checkout/releases )
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md )
- [Commits](https://github.com/actions/checkout/compare/v2...v4.2.0 )
---
updated-dependencies:
- dependency-name: actions/checkout
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-10-01 14:37:36 +02:00
Benjamin Bouvier
06e9f01a4a
chore: fix new typos
2024-10-01 14:07:14 +02:00
dependabot[bot]
0ff63d3008
chore(deps): bump crate-ci/typos from 1.20.10 to 1.25.0
...
Bumps [crate-ci/typos](https://github.com/crate-ci/typos ) from 1.20.10 to 1.25.0.
- [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.20.10...v1.25.0 )
---
updated-dependencies:
- dependency-name: crate-ci/typos
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-10-01 14:07:14 +02:00
Damir Jelić
5cc7730dd9
chore: Configure dependabot to notify us about outdated github actions
2024-10-01 13:23:08 +02:00
Damir Jelić
e5bd7602e4
refactor: Use a match arm when evaluating session comparison results
2024-10-01 13:00:51 +02:00
Damir Jelić
2fc4aacdd0
feat: Prefer room keys with better SenderData when comparing duplicate room keys
2024-10-01 13:00:51 +02:00
Pratik Deshpande
f7d99cc506
Added a binding for custom login using JWT
2024-10-01 12:33:06 +03:00
Valere
60319914e1
code review | quick doc and test cleaning
2024-10-01 10:19:25 +02:00
Valere
740356a350
test: ClientBuilder test for decryption trust requirement
2024-10-01 10:19:25 +02:00
Valere
806ee13aa0
ffi: Expose room_decryption_trust_requirement for ClientBuilder
2024-10-01 10:19:25 +02:00
Valere
3fd2f5794e
crypto: Expose with_decryption_trust_requirement for ClientBuilder
2024-10-01 10:15:17 +02:00
Damir Jelić
dc055c632c
chore: Update the changelog to mention the UserIdentity renames
2024-09-30 18:04:04 +02:00
Damir Jelić
c2ab795122
doc: Fix some doc links for the user identities
2024-09-30 18:04:04 +02:00
Damir Jelić
e7bc510313
refactor: Rename the UserIdentities enum into UserIdentity
2024-09-30 18:04:04 +02:00
Damir Jelić
7efee5a5af
refactor: Rename UserIdentity to OtherUserIdentity in the crypto crate
2024-09-30 18:04:04 +02:00
reivilibre
866b6e5f2d
client builder: return a ClientBuildError when failing to build, instead of filtering out unexpected errors ( #4016 )
...
This old method was checking invariants that were
spooky-action-at-a-distance: these invariants have changed since then,
so this would panic instead of returning a proper error to the caller.
Signed-off-by: oliverw@element.io
---------
Co-authored-by: Benjamin Bouvier <benjamin@bouvier.cc >
2024-09-30 13:43:25 +02:00
Kévin Commaille
1e0e815fab
base: Remove deprecated StateStore APIs
...
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr >
2024-09-30 12:18:10 +02:00
Kévin Commaille
99fe49bbac
sdk: Remove deprecated Room APIs
...
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr >
2024-09-30 12:18:10 +02:00
Kévin Commaille
68bc14e567
base: Expose room avatar info from RoomInfo
...
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr >
2024-09-30 12:55:39 +03:00
Benjamin Bouvier
fe648d9cb5
event cache(refactoring): don't have related event rely on ordering
...
This was because we used a `BTreeSet`, which doesn't make sense anymore
since the data part of the key got mangled with some value unrelated to
the key itself.
2024-09-30 11:50:43 +02:00
Jorge Martín
743799fbd2
ffi: move the dependency override from ffi/Cargo.toml to the root one
...
This seems to be the only way to make the log rotation fix work and avoid build warnings like:
```
warning: patch for the non root package will be ignored, specify patch at the workspace root:
package: matrix-rust-sdk/bindings/matrix-sdk-ffi/Cargo.toml
workspace: = matrix-rust-sdk/Cargo.toml
Finished `dev` profile [unoptimized] target(s) in 0.30s
```
2024-09-30 10:22:41 +02:00
Jorge Martín
ac61fc8830
ffi: create EventShieldsProvider to load shields on demand in the clients
2024-09-27 17:22:55 +02:00
Jorge Martín
52898fa526
ffi: create EventOrTransactionId enum for functions that can receive both
2024-09-27 17:22:55 +02:00
Jorge Martín
263386ea53
ffi: use event_or_transaction_id parameter name for Timeline functions that can take both
2024-09-27 17:22:55 +02:00
Jorge Martín
0082fbc0b4
ffi: add EventTimelineItemDebugInfoProvider to lazily retrieve an event's debug info
2024-09-27 17:22:55 +02:00
Jorge Martín
281a79ffc6
ffi: make From implementations for some event types use values, not references
2024-09-27 17:22:55 +02:00
Jorge Martín
bdf303aa57
ffi: remove unused unwrap_or_clone_arc_into_variant macro
2024-09-27 17:22:55 +02:00
Jorge Martín
7dcf45562c
ffi: fix bindings not using Arc wrappers
2024-09-27 17:22:55 +02:00
Jorge Martín
548c66750f
sdk-ui: Move the event-fetching logic for edit and redact functions to the sdk-ui crate where they can be tested, to the edit_by_id and redact_by_id functions.
...
Added some tests for those, based on the existing ones.
2024-09-27 17:22:55 +02:00
Jorge Martín
67df36f733
ffi: Turn EventTimelineItem into a record type
...
This improves parsing times in mobile Clients. On Android, this means a 5-10x faster parsing of timeline events.
To do that I had to:
- Make functions like `edit/redact/forward` take an identifier (EventId/TransactionId) instead of the actual event. This id will be used to look for the actual SDK timeline event in the timeline. This change will make these functions a bit less performant.
- Make `InReplyToDetails` an object instead since a record can't recursively contain itself.
- Turn `EventTimelineItem` into a record type. Do the same with `Message`, which is now `MessageContent`.
2024-09-27 17:22:55 +02:00
Damir Jelić
e61fb45504
ffi: Allow recovery to be enabled using a passphrase
2024-09-27 17:04:00 +02:00
Jorge Martín
9b7f89c183
ffi: use fork of tracing crate with a fix for Android logs rotation
2024-09-27 10:37:21 +02:00
Damir Jelić
322c5b3f83
refactor: Fold the private UserIdentities struct into UserIdentity
...
It doesn't serve any purpose and only confuses people since we have many
similarly named types.
2024-09-26 12:20:36 +02:00
Valere
14ec35e67f
Merge pull request #3985 from matrix-org/valere/invisible_crypto/identity_based_withheld_code
...
crypto: change withheld code for IdentityBased share strategy
2024-09-25 17:24:43 +02:00
Valere
2bb0c50266
crypto: change withheld code for IdentityBased share strategy
2024-09-25 16:57:52 +02:00
Ivan Enderlin
d254217217
test(integration): Enable test_room_preview and test_room_avatar_group_conversation.
...
These tests were failing since the migration from the sliding sync proxy
to Synapse.
Since the previous fixes to re-enable other tests, these 2 passes for
free.
2024-09-25 16:40:49 +02:00
Ivan Enderlin
83ce4c7ca2
test(integration): Fix test_room_notification_count.
...
This test was failing since the migration from the sliding sync proxy
to Synapse.
This patch fixes the test. The failing parts were:
1. The `timeline_limit` wasn't set, so Synapse was returning an error,
2. The `unread_notifications` was set to 0 and could not be set to 1
because that's an encrypted room.
The fact `timeline_limit` is now mandatory has been mentioned in the MSC:
https://github.com/matrix-org/matrix-spec-proposals/pull/4186/files#r1775138458
A patch in Ruma has been created. The previous patch in this repository
also contains the fix for the SDK side.
The assertions around `unread_notifications` have been removed. We no
longer use this API anymore (and it should be deprecated by the way).
2024-09-25 16:13:08 +02:00
Ivan Enderlin
2562aa3fee
chore(test): Clean a test by rewriting the code a little bit.
2024-09-25 16:13:08 +02:00
Ivan Enderlin
fcb1c96869
feat(sdk): Sliding Sync has a required timeline_limit now.
...
Since MSC4186, the `timeline_limit` value is required.
This patch uses 1 as the default value for `timeline_limit`, and forces
the `timeline_limit` to be defined everywhere.
2024-09-25 16:13:08 +02:00