Commit Graph

2213 Commits

Author SHA1 Message Date
Jonas Platte
df50d59de2 Update signature of AppService::register_event_handler
It no longer requires a mutable `AppService` and can also be chained,
like `Client::register_event_handler`.
2021-11-11 19:28:40 +01:00
Damir Jelić
1651952903 docs(sdk): Remove a bunch of unwraps from some doc examples 2021-11-11 16:58:43 +01:00
Damir Jelić
33a43af20e improvement(crypto): Use a type for the result of the room key import method 2021-11-11 16:57:31 +01:00
Damir Jelić
6a66a67454 fix(crypto): Fix the importing of exported room keys 2021-11-11 16:05:14 +01:00
Jonas Platte
83b908754e Remove unused dependencies
Found by cargo-udeps.
2021-11-10 21:43:56 +01:00
Jonas Platte
02b0ed2b42 Reduce dependencies on futures-* crates 2021-11-10 20:39:35 +01:00
Jonas Platte
c124cf5b62 Remove unnecessary use of future::ready 2021-11-10 20:39:03 +01:00
Jonas Platte
dfdf794199 Remove unnecessary use of TryFutureExt 2021-11-10 20:12:56 +01:00
Damir Jelić
df2c0bd6e9 docs(sdk): Fix a typo in the enable_encryption method 2021-11-09 19:52:46 +01:00
Damir Jelić
2e04a3753d Merge branch 'one-time-key-generationf-fix' 2021-11-09 13:50:08 +01:00
Damir Jelić
e1e864c606 fix(crypto): Save the account if we created a new key upload request 2021-11-09 12:30:48 +01:00
Damir Jelić
7f3067553b fix(crypto): Don't generate new one-time keys unless the existing ones are uploaded
This is helpful if the caller doesn't have propper request retrying.
Calling the outgoing_requests() method without actually uploading
all the requests would end up generating too many one-time keys and
removing some one-time keys that weren't used yet.

This would manifest itself down the line as undecryptable to-device
messages.
2021-11-09 11:45:20 +01:00
Julian Sparber
253d6c9af8 matrix-qrcode: Use GenericImage and GenericImageView trait
This changes `QrVerificationData::from_luma()` to accept any struct that
implements GenericImage and GenericImageView.
This way we don't force a specific container for the ImageBufffer, hence
the developer doesn't necessarily need to copy the image data into a
Vec<u8>.
2021-11-09 11:33:38 +01:00
Damir Jelić
1f1ae0059e docs: Remove the now unneeded doc cfg attributes 2021-11-09 10:43:42 +01:00
Damir Jelić
05a190ee5a docs(sdk): Add an example that prints out the SAS emojis 2021-11-08 17:17:42 +01:00
Damir Jelić
ed561f7b9e improvement(crypto): Use a struct for the SAS emoji/description pairs 2021-11-08 17:17:14 +01:00
Damir Jelić
fba12b3926 docs(sdk): Explain how room keys work in the encryption module 2021-11-08 15:32:51 +01:00
Damir Jelić
1b2ef50ded docs(sdk): Explain why it may be problematic to manually verify devices 2021-11-08 15:32:51 +01:00
Damir Jelić
c79481c6fa docs(sdk): Clarify what it means for a device to be verified 2021-11-08 15:32:51 +01:00
Damir Jelić
f5b98a62ab docs(sdk): Describe the ways we can restore a client 2021-11-08 15:32:51 +01:00
Damir Jelić
f5a6972feb improvement(crypto): Rename the EncryptionInfo struct for attachments 2021-11-08 15:32:51 +01:00
Damir Jelić
1faaba39c7 docs(sdk): Explain how cross signing helps a bit better 2021-11-08 15:32:51 +01:00
Damir Jelić
e58eb70924 chore: Switch to the 2021 edition 2021-11-08 15:32:51 +01:00
Damir Jelić
4bfc1041cc docs(sdk): Improve an entry in the e2ee failure table 2021-11-08 15:32:51 +01:00
Damir Jelić
b6f7e85964 feat(sdk): Add a method to enable encryption for a room 2021-11-08 15:32:51 +01:00
Damir Jelić
b9b02ff167 docs(sdk): Add another entry to the failure table 2021-11-08 15:32:51 +01:00
Damir Jelić
1aba90cd0b docs(sdk): Consistent headings 2021-11-08 15:32:51 +01:00
Damir Jelić
3f689e9c74 docs(sdk): Introduce a failure table for the encryption module 2021-11-08 15:32:51 +01:00
Damir Jelić
d744948a27 docs(sdk): Fix a typo 2021-11-08 15:32:51 +01:00
Damir Jelić
ccc3a005cb docs(sdk): A couple small clarifications 2021-11-08 15:32:51 +01:00
Damir Jelić
605c3b056f docs(sdk): Use a table to describe our features 2021-11-08 15:32:51 +01:00
Damir Jelić
387d25c438 docs(sdk): Explain a bit more how devices are backed by device keys 2021-11-08 15:32:51 +01:00
Damir Jelić
050f62baa7 docs(sdk): Clarify the manual verification a bit more 2021-11-08 15:32:51 +01:00
Damir Jelić
afe4f628c3 docs(sdk): Improve the UserIdentity docs 2021-11-08 15:32:51 +01:00
Damir Jelić
3964eea2e2 docs(sdk): Add some more E2EE related docs 2021-11-08 15:32:51 +01:00
Damir Jelić
687ebabca9 Merge branch 'reciprocate_qr_scanning' 2021-11-05 19:35:57 +01:00
Julian Sparber
635ee5f130 matrix-sdk: Send reciprocate to other side when scanning a Qr Code
We need to tell the other side that we scanned there Qr Code.
2021-11-05 19:05:43 +01:00
Jonas Platte
b27795c0d1 Upgrade ruma 2021-11-05 16:05:25 +01:00
Jonas Platte
f21faa9e2e Remove unused imports in doctests 2021-11-05 15:39:02 +01:00
Jonas Platte
77de8383fe Fix clippy warning 2021-11-05 15:25:16 +01:00
Jonas Platte
cdfd5f9f0c Remove unnecessary use of Ruma event content enums 2021-11-05 15:16:17 +01:00
Kévin Commaille
5eb7029568 matrix-sdk: Allow to reconfigure client with login response discovery info
Fixes #219
2021-11-02 16:45:03 +01:00
Kévin Commaille
52910d50b4 matrix-sdk: Remove unecessary mut for client
Client does not need to be mutable to set the homeserver
2021-11-02 11:59:44 +01:00
Julian Sparber
8dcfd1176f matrix-sdk-crypto: Drop MutexGuard in VerificationRequest::scan_qr_code()
We can't move MutexGuards across threads and therefore we need to drop
it before awaitng on a future since a task may be moved between threads.
2021-10-29 16:33:25 +02:00
Damir Jelić
a85f29d904 feat(sdk): Expose the method and types to scan QR codes 2021-10-28 11:54:28 +02:00
Damir Jelić
292425fd80 fix(crypto): Make sure we don't treat our own device as a new one every time 2021-10-28 11:24:02 +02:00
Damir Jelić
19266f643c improvement(crypto): Improve the logs for the keys/query handling 2021-10-28 11:24:02 +02:00
Damir Jelić
3853d0c9d7 improvement(crypto): Log the mismatched user/key if checking fails 2021-10-27 16:23:34 +02:00
Damir Jelić
3c59e186d9 improvement(crypto): Improve the logging when we decrypt room events 2021-10-27 15:00:04 +02:00
Damir Jelić
e448a76484 improvement(crypto): Improve the to-device decryption logs 2021-10-27 14:57:07 +02:00