Commit Graph

268 Commits (4df6099125034b4174536a7f4e3518799daf57be)

Author SHA1 Message Date
Devin R 4391fb695e looked over for review 2020-03-30 14:18:08 -04:00
Damir Jelić ceeb685e1a crypto: Add the MemoryStore back. 2020-03-30 17:07:36 +02:00
Devin R 705464fb51 added a few todos, cargo fmt/clippy 2020-03-30 07:14:33 -04:00
Devin R 14a8d04a03 account data loop 2020-03-29 16:24:31 -04:00
Devin R c89ae2537e add account data, current room_id calc, unread, push ruleset, ignored users 2020-03-29 15:54:26 -04:00
Devin R 05b6f4679a cargo fmt/clippy 2020-03-29 08:07:25 -04:00
Devin R 4c7acd4b18 clean up presence updating and member state, add_presence_callback method for AsyncClient 2020-03-29 08:05:40 -04:00
Devin R 0147e8c0ac update_member, update_power methods for room_member 2020-03-28 15:05:37 -04:00
Devin R d4c9bb3cec cargo fmt 2020-03-28 09:08:34 -04:00
Devin R 9ee8a2d011 merged add-events, fix a few type changes and merge fails 2020-03-28 08:58:02 -04:00
Devin R b1027796c8 Merge branch 'add-events' into room-name 2020-03-28 08:36:30 -04:00
Devin R bd50e615a7 use tokio::test, cargo fmt/clippy 2020-03-28 08:27:16 -04:00
Devin R b760b32bae fix rebase swap 2020-03-28 08:12:52 -04:00
Devin R bb89db30cb remove unused import 2020-03-28 07:52:25 -04:00
Devin R 7062bdb484 fix slice match room_aliases 2020-03-28 07:47:50 -04:00
Devin R 063d86af71 cargo fmt/clippy 2020-03-28 07:47:50 -04:00
Devin R bcdd81dc8c add test, AsyncClient room name methods 2020-03-28 07:47:50 -04:00
Devin R 011e77cf4b calculate room name internal `Room` method 2020-03-28 07:47:50 -04:00
Devin R e8b5534a71 start handle_power_levels 2020-03-28 07:07:50 -04:00
Devin R 090600e6aa restructure folders, add User, fill out RoomMember, handle prescence. 2020-03-28 06:58:30 -04:00
Devin R c2022180ad fix slice match room_aliases 2020-03-27 20:17:06 -04:00
Devin R 82f8af4c08 cargo fmt/clippy 2020-03-27 17:23:49 -04:00
Devin R a29ae2a62e add test, AsyncClient room name methods 2020-03-27 17:22:11 -04:00
Devin R 20618e7a20 calculate room name internal `Room` method 2020-03-27 16:14:16 -04:00
Damir Jelić 85f344c32e crypto: Add the ability to store group sessions to the sqlite store. 2020-03-27 17:01:21 +01:00
Damir Jelić 23065a5aa3 crypto: Use an upsert for the account saving. 2020-03-27 16:01:00 +01:00
Damir Jelić c3654bd03f crypto: More cleanup in the sqlite store. 2020-03-27 14:35:51 +01:00
Damir Jelić e4dcca550c crypto: Move the sessions cache into the cryptostore. 2020-03-27 12:09:54 +01:00
Damir Jelić fca8062da0 crytpo: Implement session storing/loading for the sql store. 2020-03-27 09:24:15 +01:00
Damir Jelić 7595cab178 async_client: Allow setting the initial device display name. 2020-03-27 09:22:29 +01:00
Damir Jelić ddaf630063 crypto: Retire the memory store. 2020-03-26 12:24:53 +01:00
Damir Jelić 485296bc34 async_client: Replace the events with decrypted ones. 2020-03-26 11:23:39 +01:00
Damir Jelić abe13d7a2d crypto: Make the session stores thread safe. 2020-03-26 11:22:40 +01:00
Damir Jelić bb3b59ac37 crypto: Add initial support to decrypt megolm encrypted events. 2020-03-25 15:03:10 +01:00
Damir Jelić ae4d90057a crypto: Wrap inbound group sessions. 2020-03-25 11:32:40 +01:00
Damir Jelić d4f0799e6c crypto: Create inbound sessions from room key events. 2020-03-24 17:25:01 +01:00
Damir Jelić 765108a10c machine: Better room key parsing. 2020-03-24 16:21:06 +01:00
Damir Jelić c72a5defee rust-sdk: Changes for the new ruma-api version. 2020-03-24 16:18:56 +01:00
Damir Jelić 4759dea9bd crypto: Decrypt to-device events. 2020-03-23 16:14:10 +01:00
Damir Jelić 4215f98e91 crypto: Add initial code for olm message decryption. 2020-03-21 16:41:48 +01:00
Damir Jelić 70dda32949 async_client: Don't assume that there are any state events. 2020-03-19 14:17:56 +01:00
Damir Jelić 39dd9280cb rust-sdk: Document our feature flags. 2020-03-19 13:55:58 +01:00
Damir Jelić 426fe1df0f crypto: Propagate a sqlite store error correctly. 2020-03-19 13:55:35 +01:00
Damir Jelić 1b8b3da733 rust-sdk: Add initial tracing/logging setup. 2020-03-19 13:55:04 +01:00
Damir Jelić 6efd216f35 cryptpo: Add test that the account is updated correctly in the store. 2020-03-19 09:39:22 +01:00
Damir Jelić 06722635e7 crypto: Add missing license headers. 2020-03-19 09:37:15 +01:00
Damir Jelić 5adab040e6 crypto: Restore the account if we're using the sqlite store. 2020-03-18 16:05:59 +01:00
Damir Jelić 4aba058695 crypto: Hook up the crypto store to the Olm machine. 2020-03-18 15:50:32 +01:00
Damir Jelić d7ab847b98 store: Loading an account can fail because there is no account. 2020-03-18 14:29:01 +01:00
Damir Jelić 114911f800 base_client: Only import the std Result type if encryption is enabled. 2020-03-18 14:17:22 +01:00
Damir Jelić 7b70cb7e41 rust-sdk: Rework our error handling. 2020-03-18 14:15:56 +01:00
Damir Jelić f517ac6f37 store: Add a store specific error type. 2020-03-18 12:38:47 +01:00
Damir Jelić 6fb29451ce crypto: Add a memory only crypto store. 2020-03-18 10:42:46 +01:00
Damir Jelić 3b1f863419 crypto: Check the shared state of the account when checking for equality. 2020-03-18 10:42:11 +01:00
Damir Jelić 7a11a57b41 crypto: Add initial crypto store. 2020-03-18 09:41:49 +01:00
Damir Jelić 00138f7ae5 crypto: Expose the pickling methods for the account. 2020-03-18 09:38:41 +01:00
Damir Jelić 708a8b1b06 Cargo.toml: Use tokio's delay_for instead of async-std's sleep. 2020-03-16 13:31:03 +01:00
Damir Jelić bd53e18aa9 Cargo.toml: Use the tokio async test macro. 2020-03-16 13:24:54 +01:00
Damir Jelić fb6c6c89e8 crypto: Update to the ruma-event renames. 2020-03-13 16:58:59 +01:00
Damir Jelić 6438444275 base_client: Restore the olm machine if a session given at client creation. 2020-03-12 16:28:02 +01:00
Damir Jelić 545ebe8d9c crytpo: Get the one-time keys count out of the sync response as well. 2020-03-12 16:14:43 +01:00
Damir Jelić 8867b198f7 base_client: Forward the sync response to our olm machine. 2020-03-12 15:41:11 +01:00
Damir Jelić 2b389a8440 crypto: Mark the Account as Send. 2020-03-11 11:44:45 +01:00
Damir Jelić e271b17766 async_client: Upload encryption keys in the sync_forever method. 2020-03-11 11:43:58 +01:00
Damir Jelić 33ee5cce61 async_client: Fix the user agent. 2020-03-11 11:43:31 +01:00
Damir Jelić bc4416e7cd async_client: Add a method to upload encryption keys. 2020-03-11 11:42:59 +01:00
Damir Jelić e7d6a5a834 base_client: Expose some olm machine methods. 2020-03-11 10:10:43 +01:00
Damir Jelić e7b32ea155 crypto: Fix the one-time-key count updating. 2020-03-11 10:09:00 +01:00
Damir Jelić f3816d04f2 base_client: Create a Olm machine after logging in. 2020-03-11 10:08:22 +01:00
Damir Jelić 22a9154bd3 crypto: Expose some sturcts to be used by the clients. 2020-03-11 10:06:33 +01:00
Damir Jelić f15b7cccea crypto: Require a borrow of the user id when creating a new Olm machine. 2020-03-11 10:05:37 +01:00
Damir Jelić 740bc2a6c1 machine: Add a method to get the key tuple that need to be uploaded. 2020-03-10 14:06:30 +01:00
Damir Jelić 3e88839a68 crypto: Use ruma structs for the one-time keys as well. 2020-03-10 13:41:14 +01:00
Damir Jelić 003d514c14 crypto: Use ruma structs to represent the generated device keys. 2020-03-10 13:02:14 +01:00
Damir Jelić c41d3873b6 rust-sdk: Cleanup the docs and fix the examples up. 2020-03-02 11:31:03 +01:00
Damir Jelić de154e272a crypto: Add one-time key signing support. 2020-02-29 11:13:57 +01:00
Damir Jelić 0288376cfe async_client: Add a timeout to the sync forever even if the sync was successful. 2020-02-28 10:33:17 +01:00
Damir Jelić 8181d96bfb crypto: Rename the uploaded key count variable. 2020-02-26 09:36:52 +01:00
Damir Jelić b171f64f1d crypto: Use the serde feature of olm-rs. 2020-02-26 09:18:53 +01:00
Damir Jelić 7605f7e6e8 crypto: Remove a lingering println. 2020-02-25 18:01:49 +01:00
Damir Jelić 92067c400c crypto: Test signature verification with an invalid key. 2020-02-25 17:49:43 +01:00
Damir Jelić 45890a27f3 crypto: Add support for device keys signing. 2020-02-25 17:36:11 +01:00
Damir Jelić 478f0d7784 crypto: Format the repo. 2020-02-25 14:36:09 +01:00
Damir Jelić 15d8de56e1 crypto: Add an initial version of the olm state machine. 2020-02-25 14:24:18 +01:00
Damir Jelić d3903811c6 rust-sdk: Add initial crytpto code. 2020-02-24 17:19:00 +01:00
Damir Jelić f8b76c6af3 test: Use the new library name. 2020-02-24 12:51:42 +01:00
Damir Jelić dee13421f0 rust-sdk: Switch the license to Apache 2.0. 2020-02-21 16:54:05 +01:00
Damir Jelić 98da341a46 Cargo.toml: Bump the dependency versions. 2020-02-21 16:33:41 +01:00
Damir Jelić 63e0191f57 client: Fix clippy warnings. 2020-02-21 14:29:46 +01:00
Damir Jelić 49a24b6305 client: Add missing docs. 2020-02-21 14:29:25 +01:00
Damir Jelić 0a74c943ba async_client: Propagate an error properly. 2020-02-21 12:13:38 +01:00
Damir Jelić 19383fd28c async_client: Add a method to fetch the homeserver. 2020-01-11 22:24:32 +01:00
Damir Jelić 5688b2e70a async_client: Remove the response callbacks. 2019-12-04 22:35:19 +01:00
Damir Jelić e21806f3cc async_client: Add the sync_forever method. 2019-12-04 22:33:26 +01:00
Damir Jelić 41a183b4c0 nio: Upgrade ruma-client-api. 2019-12-04 19:31:33 +01:00
Damir Jelić 38ddad1874 async_client: Properly handle the EventResult for our timeline. 2019-11-26 20:47:02 +01:00
Damir Jelić afcb68cc0e async_client: Make our sync method threadsafe across yield points. 2019-11-26 20:34:11 +01:00
Damir Jelić 19b9927de6 nio: Don't make the VERSION public. 2019-11-26 19:19:22 +01:00
Damir Jelić e9dfabf847 async_client: Add the event callbacks back. 2019-11-26 19:06:29 +01:00
Damir Jelić 4daea54a33 base_client: Consume sync responses and store the sync token. 2019-11-24 22:40:52 +01:00
Damir Jelić 3ab37ee8bd tests: Test the sync method of the async client. 2019-11-17 21:23:01 +01:00
Damir Jelić f246ab2f56 AsyncClient: Remove some dead code. 2019-11-17 19:59:50 +01:00
Damir Jelić d281efb309 AsyncClient: The use_sys_proxy setting is deprecated upstream. 2019-11-17 19:56:53 +01:00
Damir Jelić 88bfe1bec6 AsyncClient: Add the client version to the user-agent. 2019-11-17 19:55:59 +01:00
Damir Jelić 68102cc196 AsyncClient: Expose the logged_in method. 2019-11-17 19:55:27 +01:00
Damir Jelić 10b8d1a682 nio: Add scaffolding for member removals in the base client. 2019-11-14 20:18:31 +01:00
Damir Jelić 8d58938b41 nio-rust: Format the repo. 2019-11-10 18:33:06 +01:00
Damir Jelić 9e474a5cc2 nio: Add support for message sending in the AsyncClient. 2019-11-10 11:44:44 +01:00
Damir Jelić 2aca52c9f0 nio: Allow the AsyncClient to be clonable. 2019-11-10 11:44:03 +01:00
Damir Jelić 066d76cc8e nio: Make the callback futures Sync/Send. 2019-10-31 09:17:13 +01:00
Damir Jelić 71d8500453 nio: Reintroduce futures as callbacks. 2019-10-30 23:26:26 +01:00
Damir Jelić b61dc18060 nio: Allow callbacks to borrow the room, sadly back to non async callbacks. 2019-10-30 19:30:55 +01:00
Damir Jelić 69a18e9d3a async_client: Don't double pin futures. 2019-10-24 22:35:36 +02:00
Damir Jelić 8c681c362a async_client: Change the place where we parse the user agent. 2019-10-24 22:34:58 +02:00
Damir Jelić b8eb0489c7 base_client: Handle state events as well. 2019-10-23 23:36:57 +02:00
Damir Jelić f6d371b36f async_client: Remove the non-async callbacks. 2019-10-23 22:51:34 +02:00
Damir Jelić cf17173037 nio: Add initial base client state machine. 2019-10-23 22:47:00 +02:00
Damir Jelić 4989108324 Initial commit. 2019-10-20 13:56:46 +02:00