Commit Graph

14300 Commits

Author SHA1 Message Date
Benjamin Bouvier 8a71ac622d tests: allow bundled relations in EventBuidler 2024-10-07 07:47:05 +02:00
Benjamin Bouvier 45968b2a2b timeline: prefer a bundled edit to a pending edit when adding a new message 2024-10-07 07:47:05 +02:00
Benjamin Bouvier efbf9472f2 latest event: consider bundled edits when constructing an event item from a latest event 2024-10-07 07:47:05 +02:00
Benjamin Bouvier 1434285a1b timeline: extract edits from bundled relations and pass an optional edited content to Message::from_event
No changes in functionality.
2024-10-07 07:47:05 +02:00
Benjamin Bouvier 46856f54af timeline: get rid of one indent level thanks to a let else 2024-10-07 07:47:05 +02:00
Kévin Commaille 3ce2f16d55 base: Do not warn when room in m.direct account data is missing
It can occur that the data contains rooms that were forgotten.
Knowing that we now update that data after every sync, that creates
a lot of noise in the logs.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2024-10-07 06:51:19 +02:00
Kévin Commaille abf3c6e7b7 ui: Do not warn when no reaction to redact was found
The `handle_reaction_redaction` method is called by `handle_redaction`
for every single redaction event that we receive as a first step to
check if the redaction matches a reaction.
It means that not finding a reaction to redact is perfectly fine and is not worthy of a warning.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2024-10-04 18:00:30 +03:00
Damir Jelić a3a0125421 chore: Set up cargo-deny 2024-10-04 16:53:17 +02:00
Damir Jelić 657c72904a chore: Define our license in every crate we have 2024-10-04 16:53:17 +02:00
Damir Jelić de752eb089 chore: Use a released version of the qrcode crate for the qr-login example 2024-10-04 16:53:17 +02:00
Damir Jelić a4415c9fa5 chore: Use a released version of vodozemac 2024-10-04 16:53:17 +02:00
Andy Balaam 5d46b35d95 crypto: Rename some straggling 'Identities' to 'Identity'
The main enum was renamed to `UserIdentity` and some aliases and
comments had not kept up.
2024-10-04 14:37:12 +01:00
Kévin Commaille 65b422312c chore: Enable the proper feature of tower
We only use `service_fn` which is behind the `util` feature.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2024-10-04 12:51:38 +02:00
Kévin Commaille 7bac0340d6 base: Apply RoomInfo migrations for notable_tags and pinned_events
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2024-10-04 11:58:10 +02:00
Richard van der Hoff 1d1863d323 crypto: Give decrypt_room_event a new return type
I want to do a bit of a refactoring on `TimelineEvent`, so let's start by
giving `decrypt_room_event` its own return type.
2024-10-03 16:23:45 +01:00
Andy Balaam a695e291fa crypto: Rename PreviouslyVerified to VerificationViolation
For consistency with other places, we have now settled on
`VerificationViolation` as the best way to express this situation.
2024-10-03 15:41:55 +01:00
Andy Balaam c5f5bc8496 crypto: FFI bindings for subscribe_to_identity_status_changes 2024-10-03 13:24:24 +01:00
Andy Balaam cd072e6dff crypto: Provide a way to subscribe to identity status changes 2024-10-03 13:24:24 +01:00
Andy Balaam 9b36a04bb9 crypto: Provide the core logic about how identities change in a room when changes occur 2024-10-03 13:24:24 +01:00
Andy Balaam 6b357de947 crypto: Allow accessing the underlying identity on a UserIdentity 2024-10-03 13:24:24 +01:00
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