Damir Jelić
fe8ecbbeb8
Merge branch 'fix_lock_on_await'
2021-10-05 10:36:02 +02:00
Damir Jelić
2686e987a6
Merge branch 'dkasak/share-all-indices-with-own-trusted-devices'
2021-10-05 10:13:49 +02:00
Julian Sparber
a3f078cb96
encryption: Expose FlowId on VerificationRequest
...
Fixes: https://github.com/matrix-org/matrix-rust-sdk/issues/367
2021-10-04 22:42:39 +02:00
Julian Sparber
82659142c5
crypto: Fix VerificationRequest::generate_qr_code()
...
We can't keep a lock on the `inner` therefore clone it. It's not pretty
but we do the same in `start_sas()`.
2021-10-04 17:04:09 +02:00
Denis Kasak
3c03c64778
docs(crypto): Reword.
...
- Bring the wording in line with the wording on the matrix_sdk crate.
- Style fixes.
- Formatting.
2021-10-04 14:53:30 +02:00
Denis Kasak
fdbed7fbf8
docs(crypto): Add room key sharing decision tree to the docs.
2021-10-04 14:48:12 +02:00
Denis Kasak
759bc76f04
docs: More typo/style fixes.
2021-10-04 14:36:37 +02:00
Denis Kasak
ab1657b811
docs: Flesh out intro section a bit.
...
- Mention subcrates.
- Point out `Client` as the central component.
2021-10-04 14:34:18 +02:00
Denis Kasak
b219a347f6
Reword opening paragraph.
2021-10-04 13:15:22 +02:00
Denis Kasak
bd82738630
Fix typo.
2021-10-04 13:06:50 +02:00
Amanda Graven
9829b45ce8
Specifiy edition in rustfmt.toml
2021-10-04 12:56:49 +02:00
Denis Kasak
f2c0abeb58
Add decision tree rendering of the algorithm.
2021-10-04 12:51:16 +02:00
Denis Kasak
55731922e8
Add decision tree model of the key sharing algorithm.
...
And a tool to render it.
Signed-off-by: Denis Kasak <dkasak@termina.org.uk >
2021-10-04 12:49:16 +02:00
Denis Kasak
671efb2313
Await result.
2021-10-04 11:13:02 +02:00
Denis Kasak
da052ed9aa
clippy fix
2021-10-04 11:12:46 +02:00
Denis Kasak
49e722ffbf
cargo fmt
2021-10-04 10:57:11 +02:00
Denis Kasak
de2e2539b7
Write a test.
...
Signed-off-by: Denis Kasak <dkasak@termina.org.uk >
2021-10-04 10:51:31 +02:00
Denis Kasak
5f87ccdcd9
Explain return value in the docstring.
...
Signed-off-by: Denis Kasak <dkasak@termina.org.uk >
2021-10-04 10:51:31 +02:00
Denis Kasak
bf2195b999
crypto: Share all indices with own trusted devices.
...
This fixes an edge case in the key sharing decision algorithm in which
your own trusted devices could be getting a limited session upon a
reshare. It also simplifies the algorithm a bit by bringing the check
for an own and trusted device to the start.
If the requesting device is a trusted/verified device of our own, we
share the session in full, regardless of whether we've previously shared
with that device and at which index. Otherwise, we do the "have we
shared previously" check via the outbound session and only share from
the index it was originally shared at, as before.
Signed-off-by: Denis Kasak <dkasak@termina.org.uk >
2021-10-04 10:45:25 +02:00
Damir Jelić
3042209cf6
crypto: Check that the event was encrypted for the right room
2021-09-21 17:27:31 +02:00
Damir Jelić
87728268e2
crypto: Don't borrow the plaintext to later clone it
2021-09-21 16:48:42 +02:00
Jonas Platte
bbbd5648e0
Fix comment typos
2021-09-21 15:36:04 +02:00
Jonas Platte
b813735dd2
Remove unused dev-dependency
2021-09-21 15:24:55 +02:00
Jonas Platte
871a245702
crypto: Avoid unnecessary event serialization
2021-09-21 15:20:02 +02:00
Jonas Platte
f783fb9830
Fix typo: Missmatched => Mismatched
2021-09-21 15:19:21 +02:00
Damir Jelić
fa5aea2ca1
Merge branch 'fix-anyhow-feature'
2021-09-21 14:54:40 +02:00
Jonas Platte
2128d0bfcc
CI: Use Nightly Clippy
2021-09-21 13:12:46 +02:00
Jonas Platte
42061c9bf5
CI: Run clippy on more (Cargo) targets
2021-09-21 13:12:34 +02:00
Jonas Platte
d0851c8a9e
Fix new (Nightly) Clippy warnings
2021-09-21 13:11:53 +02:00
Jonas Platte
0817bc490e
Add missing required-features for examples
2021-09-21 13:11:31 +02:00
Jonas Platte
3621b62418
Fix Client::register future not being Send under warp feature
...
Caused by https://github.com/tokio-rs/tracing/issues/1487 .
2021-09-21 13:07:40 +02:00
Jonas Platte
cbc0739041
Re-export anyhow and eyre features from matrix-sdk-appservice
2021-09-21 11:59:47 +02:00
Jonas Platte
f752bded4b
Add eyre feature to matrix-sdk
2021-09-21 11:59:47 +02:00
Jonas Platte
6cbb07bc2d
Fix broken anyhow feature
2021-09-21 11:59:15 +02:00
Damir Jelić
4d048934e6
Merge branch 'master-rename'
2021-09-20 11:18:17 +02:00
Damir Jelić
544a66fa34
chore: Rename the master branch
2021-09-20 10:09:40 +02:00
Jonas Platte
533c86d285
Run event / notification handler callbacks in order
2021-09-17 20:46:32 +02:00
Damir Jelić
15e9d03c2c
fix(sdk): Don't retry requests in the tests
...
Since now sync_once() sends out E2EE requests after the sync and our
tests only set up the `/sync` endpoint using mockito we're going to be
stuck in a retry loop trying to send out the mentioned requests.
It's fine to disable request retrying and let those requests fail.
2021-09-17 20:19:13 +02:00
Damir Jelić
ef3f827769
docs(sdk): Fix a typo
2021-09-17 20:18:42 +02:00
Damir Jelić
d34b83851f
feat(sdk): Add a getter for the Session
2021-09-17 20:18:17 +02:00
Damir Jelić
61eefbbadd
docs(sdk): Fix some doc links.
2021-09-17 11:10:18 +02:00
Damir Jelić
544d15c574
docs(sdk): Improve a bunch of Client docs
2021-09-17 11:10:18 +02:00
Damir Jelić
8ed06883f6
fix(sdk): Don't take ownership of the user id when logging in using SSO
2021-09-17 11:10:18 +02:00
Damir Jelić
39edd32072
feat(sdk): Add a method to sync as an async stream
2021-09-17 10:54:20 +02:00
Damir Jelić
051d935b28
docs(sdk): Add better docs and examples to the sync methods
2021-09-17 10:54:20 +02:00
Damir Jelić
37904007bb
feat(sdk): Send the outgoing E2EE requests out concurrently
2021-09-16 15:43:50 +02:00
Damir Jelić
3dc9f78051
fix(sdk): Move the crypto plumbing in the sync to the sync_once method
...
This would allow people to avoid the `sync()` method and let them drive
their own syncs.
Until now using `sync()` only would mean that the crypto requests would
never have been sent out.
2021-09-16 14:36:16 +02:00
Damir Jelić
729a29352b
chore(sdk): Move the crypto plumbing of the sync into a separate method
2021-09-16 14:14:37 +02:00
Damir Jelić
626f4b92b5
chore(sdk): Remove some unwraps
2021-09-16 14:06:44 +02:00
Damir Jelić
fa6230a08a
fix(sdk): Use a better variable name for the file when uploading
2021-09-15 22:08:45 +02:00