Damir Jelić
df53eb00ab
fix(crypto): Fix a deadlock when generating the backup request
2021-11-17 13:01:58 +01:00
Damir Jelić
63915171fc
feat(crypto): Add a method to check if backups are enabled
2021-11-17 13:01:58 +01:00
Damir Jelić
4873914d4d
feat(crypto): Initial support for server-side backups of room keys
2021-11-17 13:01:44 +01:00
Damir Jelić
f069387d58
docs(sdk): Add an example to the restore_login method
2021-11-15 16:15:05 +01:00
ftilde
8815c05108
Refactor Joined::send_attachment
...
Instead of manually modifying *EventContent structs, the ruma
constructors *::encrypted and *::plain are used now depending on whether
encryption should be used for the attachment or not.
2021-11-13 01:39:00 +01:00
ftilde
dfc2ed7a33
Prefer MediaType::Encrypted if url and file are present
...
Some clients (including those using matrix-rust-sdk currently) may add
encrypted file info as well as the url to the encrypted blob to the
*EventContent. Interpreting the presence of an url as an indicator of
unencrypted message (like was done before) would result in access to the
encrypted blob in `get_media_content`.
Fixes #406 .
2021-11-13 01:39:00 +01:00
Jonas Platte
38a8253aa8
Turn register_event_handler(_context)? examples into proper doctests
...
Previously, they didn't actually run the methods they were showing the
use of.
2021-11-12 12:39:07 +01:00
Jonas Platte
5fed5cdeed
Allow adding custom event handler context
2021-11-12 12:39:07 +01:00
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