Commit Graph

14300 Commits

Author SHA1 Message Date
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
Richard van der Hoff 40e3a96ae3 Make message-ids feature the default (#3776)
The feature is now a no-op.

Will fix (I hope)
https://github.com/element-hq/element-android/issues/8872
2024-07-30 10:49:21 +01:00
Stefan Ceriu 8fe2b37354 ffi: Expose identity reset mechanism 2024-07-29 16:52:03 +03:00
Stefan Ceriu db064626fa sdk: Add high level method for resetting the user's identity and deleting all associated secrets 2024-07-29 16:52:03 +03:00
Andy Balaam 0b46a7e29c crypto: Make the return type of is_owner_of_session more specific 2024-07-29 14:50:22 +01:00
Andy Balaam 449e8b40b8 crypto: Extract a new error type: MismatchedIdentityKeysError 2024-07-29 14:50:22 +01:00
Andy Balaam d7224a7ede crypto: Store device_id in SenderData
This means we have all the information inside SenderData to populate
VerificationStatus and DeviceId for EncryptionInfo, so we can share the
code between SenderDataFinder and get_verification_state.
2024-07-29 11:11:44 +01:00
Jorge Martin Espinosa e0833110f2 Merge pull request #3771 from torrybr/feat/send-beacon
sdk: basic support for sending location beacons
2024-07-29 09:47:55 +02:00
torrybr 3756eeb385 test: move beacon tests into own file 2024-07-26 23:55:19 -04:00
torrybr dd252937c1 test: verify test_send_location_beacon_with_expired_live_share 2024-07-26 23:18:12 -04:00
torrybr ab6d039369 sdk: basic support for sending live location beacons 2024-07-26 22:57:16 -04:00
Jorge Martín 6fca1e81ed ffi: expose pin_event and unpin_event, also the currently pinned event ids in RoomInfo 2024-07-26 14:20:53 +01:00
Jorge Martín ab0494549e sdk-ui: add Timeline::pin_event and Timeline::unpin_event 2024-07-26 14:20:53 +01:00
Jorge Martín 15bf675e5e sdk-base: add Member::can_pin_or_unpin_event 2024-07-26 14:20:53 +01:00
Jorge Martín 95637c57da ffi: expose Room::can_user_pin_unpin check 2024-07-26 14:20:53 +01:00
Jorge Martín 8f90a76cb4 sdk: Add Room::can_user_pin_unpin check 2024-07-26 14:20:53 +01:00
Andy Balaam 844923dd44 crypto: Make TestOptions a builder 2024-07-26 12:47:41 +01:00
Andy Balaam 9efc6494d1 crypto: Check the device owns the session in SenderDataFinder
and add a flag to the SenderData struct to store the fact that this
check failed if it did.
2024-07-26 12:47:41 +01:00
Andy Balaam 5191737389 crypto: Require passing a session when we find SenderData 2024-07-26 12:47:41 +01:00
Damir Jelić 4fdc78f565 doc: Shorten one of our doc examples 2024-07-26 13:29:37 +02:00
torrybr 5bbe022e97 sdk: basic support for sending and stopping live location shares 2024-07-26 10:17:50 +01:00
Stefan Ceriu 6faf3f75e0 Merge pull request #3766 from matrix-org/update-dco
update DCO
2024-07-26 08:39:21 +03:00
Josh Simmons 38e842fc0f update DCO 2024-07-25 14:31:32 -07:00
Benjamin Bouvier 73759fc361 sdk-base: enable the "rand" feature on ruma there too 2024-07-25 15:20:34 +02:00
Benjamin Bouvier c1fda3a601 send queue: use the transaction id generated and saved in the db for network queries
Intense facepalm energy here.
2024-07-25 15:20:34 +02:00
Benjamin Bouvier 689f006c07 send queue: get rid of all the non-canonical events after canonicalization 2024-07-25 15:20:34 +02:00
Benjamin Bouvier 6f0da7e91b send queue: canonicalize dependent events keyed by parent transaction id 2024-07-25 15:20:34 +02:00
Benjamin Bouvier ce68ad4968 state store: add a transparent newtype ChildTransactionId to help distinguish the parent from the child transaction id 2024-07-25 15:20:34 +02:00
Benjamin Bouvier 02a929c614 timeline: flatten ReactionSenderData into PendingReaction 2024-07-25 15:13:23 +02:00
Benjamin Bouvier 7a660749ed timeline: map from the reaction local-or-remote id to the item it's reacting to 2024-07-25 15:13:23 +02:00
Benjamin Bouvier 6e82e4f14f timeline: store pending reactions without the indirection to Reactions::map 2024-07-25 15:13:23 +02:00
Benjamin Bouvier f0015bb10d timeline: store reaction by key by sender, instead of by key by local or remote id
This makes it impossible to represent states like "there's a local *and*
a remote echo for the same sender for a given reaction", or multiple
reactions from the same sender to the same event, and so on.
2024-07-25 15:13:23 +02:00