Commit graph

1691 commits

Author SHA1 Message Date
Damir Jelić
8291b93356 matrix-sdk: Update ruma. 2020-12-04 13:35:56 +01:00
Damir Jelić
804bd221b2 crypto: Improve key imports.
This patch changes so key imports load all existing sessions at once
instead loading a single session for each session we are importing. It
removes the need to lock the session when we check the first known index
and exposes the total number of sessions the key export contained.
2020-12-02 11:12:46 +01:00
Damir Jelić
45442dfac8 Merge branch 'master' into new-state-store 2020-12-01 17:24:00 +01:00
Damir Jelić
e20b1efae9 crypto: Store private identities and accounts with the Changes struct as well. 2020-12-01 17:14:32 +01:00
Damir Jelić
e65915e159 Merge branch 'crypto-improvements' 2020-12-01 15:10:58 +01:00
Damir Jelić
4800e80492 matrix-sdk: Remove an unused import. 2020-12-01 15:08:53 +01:00
Damir Jelić
5d0ff961b2 crypto: Check the Olm message hash if we fail to decrypt an Olm message.
Wether by accident (the next_batch token doesn't get stored properly) or
by malicious intent (the server replays a message) an Olm encrypted to-device
message may appear multiple times.

This is usually fine since nothing bad happens, we don't decrypt the message
and the message gets thrown away.

Since the introduction of Olm session unwedging an undecryptable message
leads to the creation of a new fresh Olm session. To avoid this we
remember which Olm messages we already decrypted so they don't trigger
an unwedging dance.
2020-12-01 14:50:04 +01:00
Damir Jelić
270350cd34 crypto: Save the olm message hash. 2020-12-01 14:38:03 +01:00
Damir Jelić
ae2391791d crypto: Use a released sqlx version. 2020-12-01 13:25:51 +01:00
Damir Jelić
24592adbba crypto: Return a higher level struct when decrypting olm messages instead of tuples 2020-12-01 12:41:11 +01:00
Damir Jelić
efe659910f crypto: Remove some stale TODOs. 2020-12-01 11:20:55 +01:00
Damir Jelić
08babb6d6c crypto: Document the new cross signing methods in the store. 2020-12-01 10:54:41 +01:00
Damir Jelić
50bd408d48 matrix-sdk: Don't use try_from for the u32 -> UInt conversion. 2020-12-01 10:34:10 +01:00
Damir Jelić
27b5bf3ddd base: Add initial left rooms handling. 2020-12-01 10:23:28 +01:00
Damir Jelić
0e563a9a81 base: Refactor out the room state/timeline handling. 2020-11-30 17:25:29 +01:00
Damir Jelić
7dd834a214 base: Add some more sync response fields. 2020-11-30 15:50:47 +01:00
Damir Jelić
b4d0179c18 base: Fetch the member presence when we fetch members. 2020-11-30 14:55:18 +01:00
Damir Jelić
38048a2043 base: Add presence storing. 2020-11-30 14:42:08 +01:00
Damir Jelić
ac2d90e92a client: Apply room changes when fetching members. 2020-11-30 09:19:11 +01:00
Damir Jelić
a8d6909c56 crypto: Use a released sqlx version. 2020-11-29 11:22:53 +01:00
Damir Jelić
fcb50956bb Merge branch 'master' into new-state-store 2020-11-26 15:18:38 +01:00
Damir Jelić
ce4d53a88c examples: Feature gate the cross signing bootstrap example. 2020-11-26 14:27:11 +01:00
Damir Jelić
7e9baf2707 crypto: Remove some dead code definitions. 2020-11-26 14:15:52 +01:00
Damir Jelić
43ced3d279 Merge branch 'crypto-improvements' into new-state-store 2020-11-26 14:08:17 +01:00
Damir Jelić
3073883076 crypto: Fix a clippy warning. 2020-11-26 14:02:35 +01:00
Damir Jelić
baa5bed1c9 Merge branch 'crypto-improvements' into new-state-store 2020-11-26 14:00:18 +01:00
Damir Jelić
7ec5a5ad1a Merge branch 'master' into crypto-improvements 2020-11-26 13:24:57 +01:00
Jonas Platte
0422bae924
Fix clippy lint rc_buffer 2020-11-25 19:01:28 +01:00
Jonas Platte
27ecab8574
Update ruma 2020-11-25 19:01:28 +01:00
Damir Jelić
de5f5cf00a base: A better log message for unhandled member events. 2020-11-24 10:58:33 +01:00
Damir Jelić
35069c5252 base: Turn the get member method async. 2020-11-24 10:58:14 +01:00
Damir Jelić
dadcc68336 base: Use the room summary for the display name calculation if we have one. 2020-11-24 10:57:21 +01:00
Damir Jelić
64fff933af base: Store the room topic with the room summary. 2020-11-24 10:56:43 +01:00
Damir Jelić
c13d04ae18 matrix-sdk: Return the members response in our get members method. 2020-11-24 10:56:07 +01:00
Damir Jelić
e84d3b9950 base: Track new users we get from the room/members call. 2020-11-23 17:19:55 +01:00
Jonas Platte
5ca66a6985
Upgrade ruma dependency 2020-11-23 15:34:38 +01:00
Jonas Platte
2e387436cf
Remove unstable-synapse-quirks from default feature set for ruma
otherwise there is no point in exposing that feature
2020-11-23 15:27:43 +01:00
Jonas Platte
591f031246
Don't disable default-features on ruma
there are no features that are active by default, this is a no-op.
2020-11-23 14:58:48 +01:00
Damir Jelić
c1383402ed matrix-sdk: Initial support to upload filters. 2020-11-22 21:25:31 +01:00
Damir Jelić
a98f23e2a7 base: Add a deserialized SyncResponse type. 2020-11-21 22:48:27 +01:00
Damir Jelić
53daf40c7c matrix-sdk: Use the latest ruma and olm-rs. 2020-11-21 16:33:12 +01:00
Damir Jelić
dedb1eb745 Merge branch 'update-ruma' 2020-11-20 21:21:24 +01:00
Damir Jelić
c40edcf2fc matrix-sdk: Try to lower our compile times, at least in the crypto part for now. 2020-11-20 20:35:48 +01:00
Damir Jelić
6509e72a74 Revert "base: Don't handle the wildcard case for member events anymore."
Using the exhaustive feature in ruma enables the appservice/federation
apis, adding some 10 more crates to our dependencies. Disable that
feature for now.

This reverts commit 41529a6bff.
2020-11-20 20:35:48 +01:00
Jonas Platte
38fec7f2b3 Upgrade ruma 2020-11-20 20:35:48 +01:00
Damir Jelić
9edf8657d0 base: WIP lazy loading support. 2020-11-20 20:17:59 +01:00
Alejandro Domínguez
95243003c4 Update ruma 2020-11-20 20:14:18 +01:00
Damir Jelić
3da1d3cf8f store: Use streams so we don't load all members at once. 2020-11-16 18:11:12 +01:00
Damir Jelić
8ed8929788 base: Fix the storing of invited and joined user ids. 2020-11-12 12:59:43 +01:00
Damir Jelić
133b230964 base: Change the way we're saving our room summary updates. 2020-11-12 11:21:37 +01:00