From 7c38e538395aff4eea227f619a712bd0a6327532 Mon Sep 17 00:00:00 2001 From: Devin R Date: Sun, 21 Jun 2020 15:58:42 -0400 Subject: [PATCH] Move to depend on ruma monorepo and ruma-events0.22 --- Cargo.lock | 2487 ---------------------------------- Cargo.toml | 12 +- src/client_server.rs | 257 ++-- src/database/account_data.rs | 2 +- src/database/globals.rs | 21 +- src/database/rooms.rs | 6 +- src/database/rooms/edus.rs | 4 +- src/database/users.rs | 2 +- src/error.rs | 5 + src/pdu.rs | 19 +- 10 files changed, 176 insertions(+), 2639 deletions(-) delete mode 100644 Cargo.lock diff --git a/Cargo.lock b/Cargo.lock deleted file mode 100644 index 07f6826..0000000 --- a/Cargo.lock +++ /dev/null @@ -1,2487 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -[[package]] -name = "addr2line" -version = "0.12.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "602d785912f476e480434627e8732e6766b760c045bbf897d9dfaa9f4fbd399c" -dependencies = [ - "gimli", -] - -[[package]] -name = "adler32" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567b077b825e468cc974f0020d4082ee6e03132512f207ef1a02fd5d00d1f32d" - -[[package]] -name = "aead" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cf01b9b56e767bb57b94ebf91a58b338002963785cdd7013e21c0d4679471e4" -dependencies = [ - "generic-array", -] - -[[package]] -name = "aes" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54eb1d8fe354e5fc611daf4f2ea97dd45a765f4f1e4512306ec183ae2e8f20c9" -dependencies = [ - "aes-soft", - "aesni", - "block-cipher-trait", -] - -[[package]] -name = "aes-gcm" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "834a6bda386024dbb7c8fc51322856c10ffe69559f972261c868485f5759c638" -dependencies = [ - "aead", - "aes", - "block-cipher-trait", - "ghash", - "subtle 2.2.3", - "zeroize", -] - -[[package]] -name = "aes-soft" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfd7e7ae3f9a1fb5c03b389fc6bb9a51400d0c13053f0dca698c832bfd893a0d" -dependencies = [ - "block-cipher-trait", - "byteorder", - "opaque-debug", -] - -[[package]] -name = "aesni" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f70a6b5f971e473091ab7cfb5ffac6cde81666c4556751d8d5620ead8abf100" -dependencies = [ - "block-cipher-trait", - "opaque-debug", -] - -[[package]] -name = "arc-swap" -version = "0.4.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d25d88fd6b8041580a654f9d0c581a047baee2b3efee13275f2fc392fc75034" - -[[package]] -name = "arrayref" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544" - -[[package]] -name = "arrayvec" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cff77d8686867eceff3105329d4698d96c2391c176d5d03adc90c7389162b5b8" - -[[package]] -name = "async-trait" -version = "0.1.36" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a265e3abeffdce30b2e26b7a11b222fe37c6067404001b434101457d0385eb92" -dependencies = [ - "proc-macro2 1.0.18", - "quote 1.0.7", - "syn 1.0.33", -] - -[[package]] -name = "atomic" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64f46ca51dca4837f1520754d1c8c36636356b81553d928dc9c177025369a06e" - -[[package]] -name = "atty" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -dependencies = [ - "hermit-abi", - "libc", - "winapi 0.3.9", -] - -[[package]] -name = "autocfg" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9d" - -[[package]] -name = "backtrace" -version = "0.3.49" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05100821de9e028f12ae3d189176b41ee198341eb8f369956407fea2f5cc666c" -dependencies = [ - "addr2line", - "cfg-if", - "libc", - "miniz_oxide", - "object", - "rustc-demangle", -] - -[[package]] -name = "base-x" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b20b618342cf9891c292c4f5ac2cde7287cc5c87e87e9c769d617793607dec1" - -[[package]] -name = "base64" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b25d992356d2eb0ed82172f5248873db5560c4721f564b13cb5193bda5e668e" -dependencies = [ - "byteorder", -] - -[[package]] -name = "base64" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b41b7ea54a0c9d92199de89e20e58d49f02f8e699814ef3fdf266f6f748d15c7" - -[[package]] -name = "base64" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff" - -[[package]] -name = "binascii" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "383d29d513d8764dcdc42ea295d979eb99c3c9f00607b3692cf68a431f7dca72" - -[[package]] -name = "bitflags" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" - -[[package]] -name = "blake2b_simd" -version = "0.5.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8fb2d74254a3a0b5cac33ac9f8ed0e44aa50378d9dbb2e5d83bd21ed1dc2c8a" -dependencies = [ - "arrayref", - "arrayvec", - "constant_time_eq", -] - -[[package]] -name = "block-buffer" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b" -dependencies = [ - "block-padding", - "byte-tools", - "byteorder", - "generic-array", -] - -[[package]] -name = "block-cipher-trait" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c924d49bd09e7c06003acda26cd9742e796e34282ec6c1189404dee0c1f4774" -dependencies = [ - "generic-array", -] - -[[package]] -name = "block-padding" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa79dedbb091f449f1f39e53edf88d5dbe95f895dae6135a8d7b881fb5af73f5" -dependencies = [ - "byte-tools", -] - -[[package]] -name = "bumpalo" -version = "3.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e8c087f005730276d1096a652e92a8bacee2e2472bcc9715a74d2bec38b5820" - -[[package]] -name = "byte-tools" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" - -[[package]] -name = "bytemuck" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37fa13df2292ecb479ec23aa06f4507928bef07839be9ef15281411076629431" - -[[package]] -name = "byteorder" -version = "1.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de" - -[[package]] -name = "bytes" -version = "0.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "118cf036fbb97d0816e3c34b2d7a1e8cfc60f68fcf63d550ddbe9bd5f59c213b" -dependencies = [ - "loom", -] - -[[package]] -name = "cc" -version = "1.0.55" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1be3409f94d7bdceeb5f5fac551039d9b3f00e25da7a74fc4d33400a0d96368" - -[[package]] -name = "cfg-if" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" - -[[package]] -name = "cloudabi" -version = "0.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" -dependencies = [ - "bitflags", -] - -[[package]] -name = "color_quant" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dbbb57365263e881e805dc77d94697c9118fd94d8da011240555aa7b23445bd" - -[[package]] -name = "conduit" -version = "0.1.0" -dependencies = [ - "base64 0.12.3", - "directories", - "http", - "image", - "js_int", - "log", - "rand", - "reqwest", - "rocket", - "ruma", - "rust-argon2 0.8.2", - "serde", - "serde_json", - "sled", - "thiserror", - "tokio", -] - -[[package]] -name = "constant_time_eq" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" - -[[package]] -name = "cookie" -version = "0.14.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca761767cf3fa9068cc893ec8c247a22d0fd0535848e65640c0548bd1f8bbb36" -dependencies = [ - "aes-gcm", - "base64 0.12.3", - "hkdf", - "percent-encoding 2.1.0", - "rand", - "sha2", - "time 0.2.16", -] - -[[package]] -name = "core-foundation" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57d24c7a13c43e870e37c1556b74555437870a04514f7685f5b354e090567171" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "core-foundation-sys" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3a71ab494c0b5b860bdc8407ae08978052417070c2ced38573a9157ad75b8ac" - -[[package]] -name = "crc32fast" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba125de2af0df55319f41944744ad91c71113bf74a4646efff39afe1f6842db1" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "crossbeam-epoch" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "058ed274caafc1f60c4997b5fc07bf7dc7cca454af7c6e81edffe5f33f70dace" -dependencies = [ - "autocfg", - "cfg-if", - "crossbeam-utils", - "lazy_static", - "maybe-uninit", - "memoffset", - "scopeguard", -] - -[[package]] -name = "crossbeam-utils" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3c7c73a2d1e9fc0886a08b93e98eb643461230d5f1925e4036204d5f2e261a8" -dependencies = [ - "autocfg", - "cfg-if", - "lazy_static", -] - -[[package]] -name = "crypto-mac" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4434400df11d95d556bac068ddfedd482915eb18fe8bea89bc80b6e4b1c179e5" -dependencies = [ - "generic-array", - "subtle 1.0.0", -] - -[[package]] -name = "deflate" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7e5d2a2273fed52a7f947ee55b092c4057025d7a3e04e5ecdbd25d6c3fb1bd7" -dependencies = [ - "adler32", - "byteorder", -] - -[[package]] -name = "devise" -version = "0.3.0" -source = "git+https://github.com/SergioBenitez/Devise.git?rev=e58b3ac9a#e58b3ac9afc3b6ff10a8aaf02a3e768a8f530089" -dependencies = [ - "devise_codegen", - "devise_core", -] - -[[package]] -name = "devise_codegen" -version = "0.3.0" -source = "git+https://github.com/SergioBenitez/Devise.git?rev=e58b3ac9a#e58b3ac9afc3b6ff10a8aaf02a3e768a8f530089" -dependencies = [ - "devise_core", - "quote 1.0.7", -] - -[[package]] -name = "devise_core" -version = "0.3.0" -source = "git+https://github.com/SergioBenitez/Devise.git?rev=e58b3ac9a#e58b3ac9afc3b6ff10a8aaf02a3e768a8f530089" -dependencies = [ - "bitflags", - "proc-macro2 1.0.18", - "quote 1.0.7", - "syn 1.0.33", -] - -[[package]] -name = "digest" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" -dependencies = [ - "generic-array", -] - -[[package]] -name = "directories" -version = "2.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "551a778172a450d7fc12e629ca3b0428d00f6afa9a43da1b630d54604e97371c" -dependencies = [ - "cfg-if", - "dirs-sys", -] - -[[package]] -name = "dirs-sys" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e93d7f5705de3e49895a2b5e0b8855a1c27f080192ae9c32a6432d50741a57a" -dependencies = [ - "libc", - "redox_users", - "winapi 0.3.9", -] - -[[package]] -name = "discard" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "212d0f5754cb6769937f4501cc0e67f4f4483c8d2c3e1e922ee9edbe4ab4c7c0" - -[[package]] -name = "dtoa" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "134951f4028bdadb9b84baf4232681efbf277da25144b9b0ad65df75946c422b" - -[[package]] -name = "encoding_rs" -version = "0.8.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8ac63f94732332f44fe654443c46f6375d1939684c17b0afb6cb56b0456e171" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "fake-simd" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" - -[[package]] -name = "fnv" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" - -[[package]] -name = "foreign-types" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" -dependencies = [ - "foreign-types-shared", -] - -[[package]] -name = "foreign-types-shared" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" - -[[package]] -name = "fs2" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9564fc758e15025b46aa6643b1b77d047d1a56a1aea6e01002ac0c7026876213" -dependencies = [ - "libc", - "winapi 0.3.9", -] - -[[package]] -name = "fuchsia-zircon" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" -dependencies = [ - "bitflags", - "fuchsia-zircon-sys", -] - -[[package]] -name = "fuchsia-zircon-sys" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" - -[[package]] -name = "futures" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e05b85ec287aac0dc34db7d4a569323df697f9c55b99b15d6b4ef8cde49f613" -dependencies = [ - "futures-channel", - "futures-core", - "futures-executor", - "futures-io", - "futures-sink", - "futures-task", - "futures-util", -] - -[[package]] -name = "futures-channel" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f366ad74c28cca6ba456d95e6422883cfb4b252a83bed929c83abfdbbf2967d5" -dependencies = [ - "futures-core", - "futures-sink", -] - -[[package]] -name = "futures-core" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59f5fff90fd5d971f936ad674802482ba441b6f09ba5e15fd8b39145582ca399" - -[[package]] -name = "futures-executor" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10d6bb888be1153d3abeb9006b11b02cf5e9b209fda28693c31ae1e4e012e314" -dependencies = [ - "futures-core", - "futures-task", - "futures-util", -] - -[[package]] -name = "futures-io" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de27142b013a8e869c14957e6d2edeef89e97c289e69d042ee3a49acd8b51789" - -[[package]] -name = "futures-macro" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0b5a30a4328ab5473878237c447333c093297bded83a4983d10f4deea240d39" -dependencies = [ - "proc-macro-hack", - "proc-macro2 1.0.18", - "quote 1.0.7", - "syn 1.0.33", -] - -[[package]] -name = "futures-sink" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f2032893cb734c7a05d85ce0cc8b8c4075278e93b24b66f9de99d6eb0fa8acc" - -[[package]] -name = "futures-task" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdb66b5f09e22019b1ab0830f7785bcea8e7a42148683f99214f73f8ec21a626" -dependencies = [ - "once_cell", -] - -[[package]] -name = "futures-util" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8764574ff08b701a084482c3c7031349104b07ac897393010494beaa18ce32c6" -dependencies = [ - "futures-channel", - "futures-core", - "futures-io", - "futures-macro", - "futures-sink", - "futures-task", - "memchr", - "pin-project", - "pin-utils", - "proc-macro-hack", - "proc-macro-nested", - "slab", -] - -[[package]] -name = "fxhash" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" -dependencies = [ - "byteorder", -] - -[[package]] -name = "generator" -version = "0.6.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "add72f17bb81521258fcc8a7a3245b1e184e916bfbe34f0ea89558f440df5c68" -dependencies = [ - "cc", - "libc", - "log", - "rustc_version", - "winapi 0.3.9", -] - -[[package]] -name = "generic-array" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c68f0274ae0e023facc3c97b2e00f076be70e254bc851d972503b328db79b2ec" -dependencies = [ - "typenum", -] - -[[package]] -name = "getrandom" -version = "0.1.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7abc8dd8451921606d809ba32e95b6111925cd2906060d2dcc29c070220503eb" -dependencies = [ - "cfg-if", - "libc", - "wasi", -] - -[[package]] -name = "ghash" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f0930ed19a7184089ea46d2fedead2f6dc2b674c5db4276b7da336c7cd83252" -dependencies = [ - "polyval", -] - -[[package]] -name = "gif" -version = "0.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "471d90201b3b223f3451cd4ad53e34295f16a1df17b1edf3736d47761c3981af" -dependencies = [ - "color_quant", - "lzw", -] - -[[package]] -name = "gimli" -version = "0.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcc8e0c9bce37868955864dbecd2b1ab2bdf967e6f28066d65aaac620444b65c" - -[[package]] -name = "glob" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" - -[[package]] -name = "h2" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79b7246d7e4b979c03fa093da39cfb3617a96bbeee6310af63991668d7e843ff" -dependencies = [ - "bytes", - "fnv", - "futures-core", - "futures-sink", - "futures-util", - "http", - "indexmap", - "log", - "slab", - "tokio", - "tokio-util", -] - -[[package]] -name = "heck" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205" -dependencies = [ - "unicode-segmentation", -] - -[[package]] -name = "hermit-abi" -version = "0.1.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9586eedd4ce6b3c498bc3b4dd92fc9f11166aa908a914071953768066c67909" -dependencies = [ - "libc", -] - -[[package]] -name = "hkdf" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fa08a006102488bd9cd5b8013aabe84955cf5ae22e304c2caf655b633aefae3" -dependencies = [ - "digest", - "hmac", -] - -[[package]] -name = "hmac" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dcb5e64cda4c23119ab41ba960d1e170a774c8e4b9d9e6a9bc18aabf5e59695" -dependencies = [ - "crypto-mac", - "digest", -] - -[[package]] -name = "http" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d569972648b2c512421b5f2a405ad6ac9666547189d0c5477a3f200f3e02f9" -dependencies = [ - "bytes", - "fnv", - "itoa", -] - -[[package]] -name = "http-body" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13d5ff830006f7646652e057693569bfe0d51760c0085a071769d142a205111b" -dependencies = [ - "bytes", - "http", -] - -[[package]] -name = "httparse" -version = "1.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd179ae861f0c2e53da70d892f5f3029f9594be0c41dc5269cd371691b1dc2f9" - -[[package]] -name = "hyper" -version = "0.13.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6e7655b9594024ad0ee439f3b5a7299369dc2a3f459b47c696f9ff676f9aa1f" -dependencies = [ - "bytes", - "futures-channel", - "futures-core", - "futures-util", - "h2", - "http", - "http-body", - "httparse", - "itoa", - "log", - "pin-project", - "socket2", - "time 0.1.43", - "tokio", - "tower-service", - "want", -] - -[[package]] -name = "hyper-tls" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3adcd308402b9553630734e9c36b77a7e48b3821251ca2493e8cd596763aafaa" -dependencies = [ - "bytes", - "hyper", - "native-tls", - "tokio", - "tokio-tls", -] - -[[package]] -name = "idna" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02e2673c30ee86b5b96a9cb52ad15718aa1f966f5ab9ad54a8b95d5ca33120a9" -dependencies = [ - "matches", - "unicode-bidi", - "unicode-normalization", -] - -[[package]] -name = "image" -version = "0.23.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5b0553fec6407d63fe2975b794dfb099f3f790bdc958823851af37b26404ab4" -dependencies = [ - "bytemuck", - "byteorder", - "gif", - "jpeg-decoder", - "num-iter", - "num-rational", - "num-traits", - "png", -] - -[[package]] -name = "indexmap" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c398b2b113b55809ceb9ee3e753fcbac793f1956663f3c36549c1346015c2afe" -dependencies = [ - "autocfg", -] - -[[package]] -name = "iovec" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e" -dependencies = [ - "libc", -] - -[[package]] -name = "itoa" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc6f3ad7b9d11a0c00842ff8de1b60ee58661048eb8049ed33c73594f359d7e6" - -[[package]] -name = "jpeg-decoder" -version = "0.1.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b47b4c4e017b01abdc5bcc126d2d1002e5a75bbe3ce73f9f4f311a916363704" -dependencies = [ - "byteorder", -] - -[[package]] -name = "js-sys" -version = "0.3.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce10c23ad2ea25ceca0093bd3192229da4c5b3c0f2de499c1ecac0d98d452177" -dependencies = [ - "wasm-bindgen", -] - -[[package]] -name = "js_int" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b2b63d60564122f2a7d6592c2f1d6c1c60e7a266b4d24715950a1ddad784f66" -dependencies = [ - "serde", -] - -[[package]] -name = "kernel32-sys" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" -dependencies = [ - "winapi 0.2.8", - "winapi-build", -] - -[[package]] -name = "lazy_static" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" - -[[package]] -name = "libc" -version = "0.2.71" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9457b06509d27052635f90d6466700c65095fdf75409b3fbdd903e988b886f49" - -[[package]] -name = "lock_api" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4da24a77a3d8a6d4862d95f72e6fdb9c09a643ecdb402d754004a557f2bec75" -dependencies = [ - "scopeguard", -] - -[[package]] -name = "log" -version = "0.4.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "loom" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ecc775857611e1df29abba5c41355cdf540e7e9d4acfdf0f355eefee82330b7" -dependencies = [ - "cfg-if", - "generator", - "scoped-tls", -] - -[[package]] -name = "lzw" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d947cbb889ed21c2a84be6ffbaebf5b4e0f4340638cba0444907e38b56be084" - -[[package]] -name = "matches" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" - -[[package]] -name = "maybe-uninit" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" - -[[package]] -name = "memchr" -version = "2.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3728d817d99e5ac407411fa471ff9800a778d88a24685968b36824eaf4bee400" - -[[package]] -name = "memoffset" -version = "0.5.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4fc2c02a7e374099d4ee95a193111f72d2110197fe200272371758f6c3643d8" -dependencies = [ - "autocfg", -] - -[[package]] -name = "mime" -version = "0.3.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" - -[[package]] -name = "mime_guess" -version = "2.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2684d4c2e97d99848d30b324b00c8fcc7e5c897b7cbb5819b09e7c90e8baf212" -dependencies = [ - "mime", - "unicase", -] - -[[package]] -name = "miniz_oxide" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "791daaae1ed6889560f8c4359194f56648355540573244a5448a83ba1ecc7435" -dependencies = [ - "adler32", -] - -[[package]] -name = "mio" -version = "0.6.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fce347092656428bc8eaf6201042cb551b8d67855af7374542a92a0fbfcac430" -dependencies = [ - "cfg-if", - "fuchsia-zircon", - "fuchsia-zircon-sys", - "iovec", - "kernel32-sys", - "libc", - "log", - "miow", - "net2", - "slab", - "winapi 0.2.8", -] - -[[package]] -name = "mio-uds" -version = "0.6.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afcb699eb26d4332647cc848492bbc15eafb26f08d0304550d5aa1f612e066f0" -dependencies = [ - "iovec", - "libc", - "mio", -] - -[[package]] -name = "miow" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919" -dependencies = [ - "kernel32-sys", - "net2", - "winapi 0.2.8", - "ws2_32-sys", -] - -[[package]] -name = "native-tls" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b0d88c06fe90d5ee94048ba40409ef1d9315d86f6f38c2efdaad4fb50c58b2d" -dependencies = [ - "lazy_static", - "libc", - "log", - "openssl", - "openssl-probe", - "openssl-sys", - "schannel", - "security-framework", - "security-framework-sys", - "tempfile", -] - -[[package]] -name = "net2" -version = "0.2.34" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ba7c918ac76704fb42afcbbb43891e72731f3dcca3bef2a19786297baf14af7" -dependencies = [ - "cfg-if", - "libc", - "winapi 0.3.9", -] - -[[package]] -name = "num-integer" -version = "0.1.43" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d59457e662d541ba17869cf51cf177c0b5f0cbf476c66bdc90bf1edac4f875b" -dependencies = [ - "autocfg", - "num-traits", -] - -[[package]] -name = "num-iter" -version = "0.1.41" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a6e6b7c748f995c4c29c5f5ae0248536e04a5739927c74ec0fa564805094b9f" -dependencies = [ - "autocfg", - "num-integer", - "num-traits", -] - -[[package]] -name = "num-rational" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5b4d7360f362cfb50dde8143501e6940b22f644be75a4cc90b2d81968908138" -dependencies = [ - "autocfg", - "num-integer", - "num-traits", -] - -[[package]] -name = "num-traits" -version = "0.2.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac267bcc07f48ee5f8935ab0d24f316fb722d7a1292e2913f0cc196b29ffd611" -dependencies = [ - "autocfg", -] - -[[package]] -name = "num_cpus" -version = "1.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3" -dependencies = [ - "hermit-abi", - "libc", -] - -[[package]] -name = "object" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ab52be62400ca80aa00285d25253d7f7c437b7375c4de678f5405d3afe82ca5" - -[[package]] -name = "once_cell" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b631f7e854af39a1739f401cf34a8a013dfe09eac4fa4dba91e9768bd28168d" - -[[package]] -name = "opaque-debug" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c" - -[[package]] -name = "openssl" -version = "0.10.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d575eff3665419f9b83678ff2815858ad9d11567e082f5ac1814baba4e2bcb4" -dependencies = [ - "bitflags", - "cfg-if", - "foreign-types", - "lazy_static", - "libc", - "openssl-sys", -] - -[[package]] -name = "openssl-probe" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de" - -[[package]] -name = "openssl-sys" -version = "0.9.58" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a842db4709b604f0fe5d1170ae3565899be2ad3d9cbc72dedc789ac0511f78de" -dependencies = [ - "autocfg", - "cc", - "libc", - "pkg-config", - "vcpkg", -] - -[[package]] -name = "parking_lot" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3a704eb390aafdc107b0e392f56a82b668e3a71366993b5340f5833fd62505e" -dependencies = [ - "lock_api", - "parking_lot_core", -] - -[[package]] -name = "parking_lot_core" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d58c7c768d4ba344e3e8d72518ac13e259d7c7ade24167003b8488e10b6740a3" -dependencies = [ - "cfg-if", - "cloudabi", - "libc", - "redox_syscall", - "smallvec", - "winapi 0.3.9", -] - -[[package]] -name = "pear" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5320f212db967792b67cfe12bd469d08afd6318a249bd917d5c19bc92200ab8a" -dependencies = [ - "pear_codegen", -] - -[[package]] -name = "pear_codegen" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfc1c836fdc3d1ef87c348b237b5b5c4dff922156fb2d968f57734f9669768ca" -dependencies = [ - "proc-macro2 0.4.30", - "quote 0.6.13", - "syn 0.15.44", - "version_check", - "yansi", -] - -[[package]] -name = "percent-encoding" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" - -[[package]] -name = "percent-encoding" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" - -[[package]] -name = "pin-project" -version = "0.4.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12e3a6cdbfe94a5e4572812a0201f8c0ed98c1c452c7b8563ce2276988ef9c17" -dependencies = [ - "pin-project-internal", -] - -[[package]] -name = "pin-project-internal" -version = "0.4.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a0ffd45cf79d88737d7cc85bfd5d2894bee1139b356e616fe85dc389c61aaf7" -dependencies = [ - "proc-macro2 1.0.18", - "quote 1.0.7", - "syn 1.0.33", -] - -[[package]] -name = "pin-project-lite" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "282adbf10f2698a7a77f8e983a74b2d18176c19a7fd32a45446139ae7b02b715" - -[[package]] -name = "pin-utils" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" - -[[package]] -name = "pkg-config" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05da548ad6865900e60eaba7f589cc0783590a92e940c26953ff81ddbab2d677" - -[[package]] -name = "png" -version = "0.16.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34ccdd66f6fe4b2433b07e4728e9a013e43233120427046e93ceb709c3a439bf" -dependencies = [ - "bitflags", - "crc32fast", - "deflate", - "miniz_oxide", -] - -[[package]] -name = "polyval" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ec3341498978de3bfd12d1b22f1af1de22818f5473a11e8a6ef997989e3a212" -dependencies = [ - "cfg-if", - "universal-hash", -] - -[[package]] -name = "ppv-lite86" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "237a5ed80e274dbc66f86bd59c1e25edc039660be53194b5fe0a482e0f2612ea" - -[[package]] -name = "proc-macro-hack" -version = "0.5.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e0456befd48169b9f13ef0f0ad46d492cf9d2dbb918bcf38e01eed4ce3ec5e4" - -[[package]] -name = "proc-macro-nested" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eba180dafb9038b050a4c280019bbedf9f2467b61e5d892dcad585bb57aadc5a" - -[[package]] -name = "proc-macro2" -version = "0.4.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759" -dependencies = [ - "unicode-xid 0.1.0", -] - -[[package]] -name = "proc-macro2" -version = "1.0.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "beae6331a816b1f65d04c45b078fd8e6c93e8071771f41b8163255bbd8d7c8fa" -dependencies = [ - "unicode-xid 0.2.1", -] - -[[package]] -name = "quote" -version = "0.6.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1" -dependencies = [ - "proc-macro2 0.4.30", -] - -[[package]] -name = "quote" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa563d17ecb180e500da1cfd2b028310ac758de548efdd203e18f283af693f37" -dependencies = [ - "proc-macro2 1.0.18", -] - -[[package]] -name = "rand" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" -dependencies = [ - "getrandom", - "libc", - "rand_chacha", - "rand_core", - "rand_hc", -] - -[[package]] -name = "rand_chacha" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" -dependencies = [ - "ppv-lite86", - "rand_core", -] - -[[package]] -name = "rand_core" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" -dependencies = [ - "getrandom", -] - -[[package]] -name = "rand_hc" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" -dependencies = [ - "rand_core", -] - -[[package]] -name = "redox_syscall" -version = "0.1.56" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2439c63f3f6139d1b57529d16bc3b8bb855230c8efcc5d3a896c8bea7c3b1e84" - -[[package]] -name = "redox_users" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09b23093265f8d200fa7b4c2c76297f47e681c655f6f1285a8780d6a022f7431" -dependencies = [ - "getrandom", - "redox_syscall", - "rust-argon2 0.7.0", -] - -[[package]] -name = "ref-cast" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "745c1787167ddae5569661d5ffb8b25ae5fedbf46717eaa92d652221cec72623" -dependencies = [ - "ref-cast-impl", -] - -[[package]] -name = "ref-cast-impl" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d21b475ab879ef0e315ad99067fa25778c3b0377f57f1b00207448dac1a3144" -dependencies = [ - "proc-macro2 1.0.18", - "quote 1.0.7", - "syn 1.0.33", -] - -[[package]] -name = "remove_dir_all" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" -dependencies = [ - "winapi 0.3.9", -] - -[[package]] -name = "reqwest" -version = "0.10.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b82c9238b305f26f53443e3a4bc8528d64b8d0bee408ec949eb7bf5635ec680" -dependencies = [ - "base64 0.12.3", - "bytes", - "encoding_rs", - "futures-core", - "futures-util", - "http", - "http-body", - "hyper", - "hyper-tls", - "js-sys", - "lazy_static", - "log", - "mime", - "mime_guess", - "native-tls", - "percent-encoding 2.1.0", - "pin-project-lite", - "serde", - "serde_urlencoded", - "tokio", - "tokio-tls", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "winreg", -] - -[[package]] -name = "ring" -version = "0.16.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "952cd6b98c85bbc30efa1ba5783b8abf12fec8b3287ffa52605b9432313e34e4" -dependencies = [ - "cc", - "libc", - "once_cell", - "spin", - "untrusted", - "web-sys", - "winapi 0.3.9", -] - -[[package]] -name = "rocket" -version = "0.5.0-dev" -source = "git+https://github.com/SergioBenitez/Rocket.git?rev=33e95f49008dcbc8dc51da7d37e0570059176b73#33e95f49008dcbc8dc51da7d37e0570059176b73" -dependencies = [ - "async-trait", - "atomic", - "atty", - "binascii", - "futures", - "log", - "memchr", - "num_cpus", - "pear", - "ref-cast", - "rocket_codegen", - "rocket_http", - "state", - "time 0.2.16", - "tokio", - "toml", - "version_check", - "yansi", -] - -[[package]] -name = "rocket_codegen" -version = "0.5.0-dev" -source = "git+https://github.com/SergioBenitez/Rocket.git?rev=33e95f49008dcbc8dc51da7d37e0570059176b73#33e95f49008dcbc8dc51da7d37e0570059176b73" -dependencies = [ - "devise", - "glob", - "indexmap", - "quote 1.0.7", - "rocket_http", - "version_check", - "yansi", -] - -[[package]] -name = "rocket_http" -version = "0.5.0-dev" -source = "git+https://github.com/SergioBenitez/Rocket.git?rev=33e95f49008dcbc8dc51da7d37e0570059176b73#33e95f49008dcbc8dc51da7d37e0570059176b73" -dependencies = [ - "cookie", - "http", - "hyper", - "indexmap", - "log", - "mime", - "pear", - "percent-encoding 1.0.1", - "ref-cast", - "smallvec", - "state", - "time 0.2.16", - "tokio", - "tokio-rustls", - "unicode-xid 0.2.1", -] - -[[package]] -name = "ruma" -version = "0.1.0" -source = "git+https://github.com/timokoesters/ruma#5a30f9cfc6c168f25cfcf51f3d80b3594c0f59b1" -dependencies = [ - "ruma-api", - "ruma-client-api", - "ruma-common", - "ruma-events", - "ruma-federation-api", - "ruma-identifiers", - "ruma-signatures", -] - -[[package]] -name = "ruma-api" -version = "0.16.1" -source = "git+https://github.com/timokoesters/ruma#5a30f9cfc6c168f25cfcf51f3d80b3594c0f59b1" -dependencies = [ - "http", - "percent-encoding 2.1.0", - "ruma-api-macros", - "ruma-identifiers", - "ruma-serde", - "serde", - "serde_json", - "strum", -] - -[[package]] -name = "ruma-api-macros" -version = "0.16.1" -source = "git+https://github.com/timokoesters/ruma#5a30f9cfc6c168f25cfcf51f3d80b3594c0f59b1" -dependencies = [ - "proc-macro2 1.0.18", - "quote 1.0.7", - "syn 1.0.33", -] - -[[package]] -name = "ruma-client-api" -version = "0.9.0" -source = "git+https://github.com/timokoesters/ruma#5a30f9cfc6c168f25cfcf51f3d80b3594c0f59b1" -dependencies = [ - "http", - "js_int", - "ruma-api", - "ruma-common", - "ruma-events", - "ruma-identifiers", - "ruma-serde", - "serde", - "serde_json", - "strum", -] - -[[package]] -name = "ruma-common" -version = "0.1.3" -source = "git+https://github.com/timokoesters/ruma#5a30f9cfc6c168f25cfcf51f3d80b3594c0f59b1" -dependencies = [ - "matches", - "ruma-serde", - "serde", - "serde_json", - "strum", -] - -[[package]] -name = "ruma-events" -version = "0.21.3" -source = "git+https://github.com/ruma/ruma-events?rev=c1ee72d#c1ee72db0f3107a97f6a4273a0ea3fed5c4c30e2" -dependencies = [ - "js_int", - "ruma-common", - "ruma-events-macros", - "ruma-identifiers", - "ruma-serde", - "serde", - "serde_json", - "strum", -] - -[[package]] -name = "ruma-events-macros" -version = "0.21.3" -source = "git+https://github.com/ruma/ruma-events?rev=c1ee72d#c1ee72db0f3107a97f6a4273a0ea3fed5c4c30e2" -dependencies = [ - "proc-macro2 1.0.18", - "quote 1.0.7", - "syn 1.0.33", -] - -[[package]] -name = "ruma-federation-api" -version = "0.0.2" -source = "git+https://github.com/timokoesters/ruma#5a30f9cfc6c168f25cfcf51f3d80b3594c0f59b1" -dependencies = [ - "js_int", - "matches", - "ruma-api", - "ruma-events", - "ruma-identifiers", - "ruma-serde", - "serde", - "serde_json", -] - -[[package]] -name = "ruma-identifiers" -version = "0.16.2" -source = "git+https://github.com/timokoesters/ruma#5a30f9cfc6c168f25cfcf51f3d80b3594c0f59b1" -dependencies = [ - "rand", - "serde", - "strum", -] - -[[package]] -name = "ruma-serde" -version = "0.2.2" -source = "git+https://github.com/timokoesters/ruma#5a30f9cfc6c168f25cfcf51f3d80b3594c0f59b1" -dependencies = [ - "dtoa", - "itoa", - "js_int", - "serde", - "serde_json", - "url", -] - -[[package]] -name = "ruma-signatures" -version = "0.6.0-dev.1" -source = "git+https://github.com/timokoesters/ruma#5a30f9cfc6c168f25cfcf51f3d80b3594c0f59b1" -dependencies = [ - "base64 0.12.3", - "ring", - "serde_json", - "untrusted", -] - -[[package]] -name = "rust-argon2" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bc8af4bda8e1ff4932523b94d3dd20ee30a87232323eda55903ffd71d2fb017" -dependencies = [ - "base64 0.11.0", - "blake2b_simd", - "constant_time_eq", - "crossbeam-utils", -] - -[[package]] -name = "rust-argon2" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dab61250775933275e84053ac235621dfb739556d5c54a2f2e9313b7cf43a19" -dependencies = [ - "base64 0.12.3", - "blake2b_simd", - "constant_time_eq", - "crossbeam-utils", -] - -[[package]] -name = "rustc-demangle" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c691c0e608126e00913e33f0ccf3727d5fc84573623b8d65b2df340b5201783" - -[[package]] -name = "rustc_version" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" -dependencies = [ - "semver", -] - -[[package]] -name = "rustls" -version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b25a18b1bf7387f0145e7f8324e700805aade3842dd3db2e74e4cdeb4677c09e" -dependencies = [ - "base64 0.10.1", - "log", - "ring", - "sct", - "webpki", -] - -[[package]] -name = "ryu" -version = "1.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e" - -[[package]] -name = "schannel" -version = "0.1.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f05ba609c234e60bee0d547fe94a4c7e9da733d1c962cf6e59efa4cd9c8bc75" -dependencies = [ - "lazy_static", - "winapi 0.3.9", -] - -[[package]] -name = "scoped-tls" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "332ffa32bf586782a3efaeb58f127980944bbc8c4d6913a86107ac2a5ab24b28" - -[[package]] -name = "scopeguard" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" - -[[package]] -name = "sct" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3042af939fca8c3453b7af0f1c66e533a15a86169e39de2657310ade8f98d3c" -dependencies = [ - "ring", - "untrusted", -] - -[[package]] -name = "security-framework" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64808902d7d99f78eaddd2b4e2509713babc3dc3c85ad6f4c447680f3c01e535" -dependencies = [ - "bitflags", - "core-foundation", - "core-foundation-sys", - "libc", - "security-framework-sys", -] - -[[package]] -name = "security-framework-sys" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17bf11d99252f512695eb468de5516e5cf75455521e69dfe343f3b74e4748405" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "semver" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" -dependencies = [ - "semver-parser", -] - -[[package]] -name = "semver-parser" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" - -[[package]] -name = "serde" -version = "1.0.114" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5317f7588f0a5078ee60ef675ef96735a1442132dc645eb1d12c018620ed8cd3" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde_derive" -version = "1.0.114" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a0be94b04690fbaed37cddffc5c134bf537c8e3329d53e982fe04c374978f8e" -dependencies = [ - "proc-macro2 1.0.18", - "quote 1.0.7", - "syn 1.0.33", -] - -[[package]] -name = "serde_json" -version = "1.0.55" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec2c5d7e739bc07a3e73381a39d61fdb5f671c60c1df26a130690665803d8226" -dependencies = [ - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "serde_urlencoded" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ec5d77e2d4c73717816afac02670d5c4f534ea95ed430442cad02e7a6e32c97" -dependencies = [ - "dtoa", - "itoa", - "serde", - "url", -] - -[[package]] -name = "sha1" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2579985fda508104f7587689507983eadd6a6e84dd35d6d115361f530916fa0d" - -[[package]] -name = "sha2" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a256f46ea78a0c0d9ff00077504903ac881a1dafdc20da66545699e7776b3e69" -dependencies = [ - "block-buffer", - "digest", - "fake-simd", - "opaque-debug", -] - -[[package]] -name = "signal-hook-registry" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94f478ede9f64724c5d173d7bb56099ec3e2d9fc2774aac65d34b8b890405f41" -dependencies = [ - "arc-swap", - "libc", -] - -[[package]] -name = "slab" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" - -[[package]] -name = "sled" -version = "0.32.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdad3dc85d888056d3bd9954ffdf22d8a22701b6cd3aca4f6df4c436111898c4" -dependencies = [ - "backtrace", - "crc32fast", - "crossbeam-epoch", - "crossbeam-utils", - "fs2", - "fxhash", - "libc", - "log", - "parking_lot", -] - -[[package]] -name = "smallvec" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7cb5678e1615754284ec264d9bb5b4c27d2018577fd90ac0ceb578591ed5ee4" - -[[package]] -name = "socket2" -version = "0.3.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03088793f677dce356f3ccc2edb1b314ad191ab702a5de3faf49304f7e104918" -dependencies = [ - "cfg-if", - "libc", - "redox_syscall", - "winapi 0.3.9", -] - -[[package]] -name = "spin" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" - -[[package]] -name = "standback" -version = "0.2.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0437cfb83762844799a60e1e3b489d5ceb6a650fbacb86437badc1b6d87b246" -dependencies = [ - "version_check", -] - -[[package]] -name = "state" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7345c971d1ef21ffdbd103a75990a15eb03604fc8b8852ca8cb418ee1a099028" - -[[package]] -name = "stdweb" -version = "0.4.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d022496b16281348b52d0e30ae99e01a73d737b2f45d38fed4edf79f9325a1d5" -dependencies = [ - "discard", - "rustc_version", - "stdweb-derive", - "stdweb-internal-macros", - "stdweb-internal-runtime", - "wasm-bindgen", -] - -[[package]] -name = "stdweb-derive" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c87a60a40fccc84bef0652345bbbbbe20a605bf5d0ce81719fc476f5c03b50ef" -dependencies = [ - "proc-macro2 1.0.18", - "quote 1.0.7", - "serde", - "serde_derive", - "syn 1.0.33", -] - -[[package]] -name = "stdweb-internal-macros" -version = "0.2.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58fa5ff6ad0d98d1ffa8cb115892b6e69d67799f6763e162a1c9db421dc22e11" -dependencies = [ - "base-x", - "proc-macro2 1.0.18", - "quote 1.0.7", - "serde", - "serde_derive", - "serde_json", - "sha1", - "syn 1.0.33", -] - -[[package]] -name = "stdweb-internal-runtime" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "213701ba3370744dcd1a12960caa4843b3d68b4d1c0a5d575e0d65b2ee9d16c0" - -[[package]] -name = "strum" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57bd81eb48f4c437cadc685403cad539345bf703d78e63707418431cecd4522b" -dependencies = [ - "strum_macros", -] - -[[package]] -name = "strum_macros" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87c85aa3f8ea653bfd3ddf25f7ee357ee4d204731f6aa9ad04002306f6e2774c" -dependencies = [ - "heck", - "proc-macro2 1.0.18", - "quote 1.0.7", - "syn 1.0.33", -] - -[[package]] -name = "subtle" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d67a5a62ba6e01cb2192ff309324cb4875d0c451d55fe2319433abe7a05a8ee" - -[[package]] -name = "subtle" -version = "2.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "502d53007c02d7605a05df1c1a73ee436952781653da5d0bf57ad608f66932c1" - -[[package]] -name = "syn" -version = "0.15.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ca4b3b69a77cbe1ffc9e198781b7acb0c7365a883670e8f1c1bc66fba79a5c5" -dependencies = [ - "proc-macro2 0.4.30", - "quote 0.6.13", - "unicode-xid 0.1.0", -] - -[[package]] -name = "syn" -version = "1.0.33" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8d5d96e8cbb005d6959f119f773bfaebb5684296108fb32600c00cde305b2cd" -dependencies = [ - "proc-macro2 1.0.18", - "quote 1.0.7", - "unicode-xid 0.2.1", -] - -[[package]] -name = "tempfile" -version = "3.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9" -dependencies = [ - "cfg-if", - "libc", - "rand", - "redox_syscall", - "remove_dir_all", - "winapi 0.3.9", -] - -[[package]] -name = "thiserror" -version = "1.0.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dfdd070ccd8ccb78f4ad66bf1982dc37f620ef696c6b5028fe2ed83dd3d0d08" -dependencies = [ - "thiserror-impl", -] - -[[package]] -name = "thiserror-impl" -version = "1.0.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd80fc12f73063ac132ac92aceea36734f04a1d93c1240c6944e23a3b8841793" -dependencies = [ - "proc-macro2 1.0.18", - "quote 1.0.7", - "syn 1.0.33", -] - -[[package]] -name = "time" -version = "0.1.43" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca8a50ef2360fbd1eeb0ecd46795a87a19024eb4b53c5dc916ca1fd95fe62438" -dependencies = [ - "libc", - "winapi 0.3.9", -] - -[[package]] -name = "time" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a51cadc5b1eec673a685ff7c33192ff7b7603d0b75446fb354939ee615acb15" -dependencies = [ - "cfg-if", - "libc", - "standback", - "stdweb", - "time-macros", - "version_check", - "winapi 0.3.9", -] - -[[package]] -name = "time-macros" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ae9b6e9f095bc105e183e3cd493d72579be3181ad4004fceb01adbe9eecab2d" -dependencies = [ - "proc-macro-hack", - "time-macros-impl", -] - -[[package]] -name = "time-macros-impl" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5c3be1edfad6027c69f5491cf4cb310d1a71ecd6af742788c6ff8bced86b8fa" -dependencies = [ - "proc-macro-hack", - "proc-macro2 1.0.18", - "quote 1.0.7", - "standback", - "syn 1.0.33", -] - -[[package]] -name = "tinyvec" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53953d2d3a5ad81d9f844a32f14ebb121f50b650cd59d0ee2a07cf13c617efed" - -[[package]] -name = "tokio" -version = "0.2.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d099fa27b9702bed751524694adbe393e18b36b204da91eb1cbbbbb4a5ee2d58" -dependencies = [ - "bytes", - "fnv", - "futures-core", - "iovec", - "lazy_static", - "libc", - "memchr", - "mio", - "mio-uds", - "num_cpus", - "pin-project-lite", - "signal-hook-registry", - "slab", - "tokio-macros", - "winapi 0.3.9", -] - -[[package]] -name = "tokio-macros" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0c3acc6aa564495a0f2e1d59fab677cd7f81a19994cfc7f3ad0e64301560389" -dependencies = [ - "proc-macro2 1.0.18", - "quote 1.0.7", - "syn 1.0.33", -] - -[[package]] -name = "tokio-rustls" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3068d891551949b37681724d6b73666787cc63fa8e255c812a41d2513aff9775" -dependencies = [ - "futures-core", - "rustls", - "tokio", - "webpki", -] - -[[package]] -name = "tokio-tls" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a70f4fcd7b3b24fb194f837560168208f669ca8cb70d0c4b862944452396343" -dependencies = [ - "native-tls", - "tokio", -] - -[[package]] -name = "tokio-util" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be8242891f2b6cbef26a2d7e8605133c2c554cd35b3e4948ea892d6d68436499" -dependencies = [ - "bytes", - "futures-core", - "futures-sink", - "log", - "pin-project-lite", - "tokio", -] - -[[package]] -name = "toml" -version = "0.4.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "758664fc71a3a69038656bee8b6be6477d2a6c315a6b81f7081f591bffa4111f" -dependencies = [ - "serde", -] - -[[package]] -name = "tower-service" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e987b6bf443f4b5b3b6f38704195592cca41c5bb7aedd3c3693c7081f8289860" - -[[package]] -name = "try-lock" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e604eb7b43c06650e854be16a2a03155743d3752dd1c943f6829e26b7a36e382" - -[[package]] -name = "typenum" -version = "1.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "373c8a200f9e67a0c95e62a4f52fbf80c23b4381c05a17845531982fa99e6b33" - -[[package]] -name = "unicase" -version = "2.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" -dependencies = [ - "version_check", -] - -[[package]] -name = "unicode-bidi" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" -dependencies = [ - "matches", -] - -[[package]] -name = "unicode-normalization" -version = "0.1.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fb19cf769fa8c6a80a162df694621ebeb4dafb606470b2b2fce0be40a98a977" -dependencies = [ - "tinyvec", -] - -[[package]] -name = "unicode-segmentation" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e83e153d1053cbb5a118eeff7fd5be06ed99153f00dbcd8ae310c5fb2b22edc0" - -[[package]] -name = "unicode-xid" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" - -[[package]] -name = "unicode-xid" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7fe0bb3479651439c9112f72b6c505038574c9fbb575ed1bf3b797fa39dd564" - -[[package]] -name = "universal-hash" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df0c900f2f9b4116803415878ff48b63da9edb268668e08cf9292d7503114a01" -dependencies = [ - "generic-array", - "subtle 2.2.3", -] - -[[package]] -name = "untrusted" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" - -[[package]] -name = "url" -version = "2.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "829d4a8476c35c9bf0bbce5a3b23f4106f79728039b726d292bb93bc106787cb" -dependencies = [ - "idna", - "matches", - "percent-encoding 2.1.0", -] - -[[package]] -name = "vcpkg" -version = "0.2.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6454029bf181f092ad1b853286f23e2c507d8e8194d01d92da4a55c274a5508c" - -[[package]] -name = "version_check" -version = "0.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5a972e5669d67ba988ce3dc826706fb0a8b01471c088cb0b6110b805cc36aed" - -[[package]] -name = "want" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" -dependencies = [ - "log", - "try-lock", -] - -[[package]] -name = "wasi" -version = "0.9.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" - -[[package]] -name = "wasm-bindgen" -version = "0.2.63" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c2dc4aa152834bc334f506c1a06b866416a8b6697d5c9f75b9a689c8486def0" -dependencies = [ - "cfg-if", - "serde", - "serde_json", - "wasm-bindgen-macro", -] - -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.63" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ded84f06e0ed21499f6184df0e0cb3494727b0c5da89534e0fcc55c51d812101" -dependencies = [ - "bumpalo", - "lazy_static", - "log", - "proc-macro2 1.0.18", - "quote 1.0.7", - "syn 1.0.33", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-futures" -version = "0.4.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64487204d863f109eb77e8462189d111f27cb5712cc9fdb3461297a76963a2f6" -dependencies = [ - "cfg-if", - "js-sys", - "wasm-bindgen", - "web-sys", -] - -[[package]] -name = "wasm-bindgen-macro" -version = "0.2.63" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "838e423688dac18d73e31edce74ddfac468e37b1506ad163ffaf0a46f703ffe3" -dependencies = [ - "quote 1.0.7", - "wasm-bindgen-macro-support", -] - -[[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.63" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3156052d8ec77142051a533cdd686cba889537b213f948cd1d20869926e68e92" -dependencies = [ - "proc-macro2 1.0.18", - "quote 1.0.7", - "syn 1.0.33", - "wasm-bindgen-backend", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-shared" -version = "0.2.63" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9ba19973a58daf4db6f352eda73dc0e289493cd29fb2632eb172085b6521acd" - -[[package]] -name = "web-sys" -version = "0.3.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b72fe77fd39e4bd3eaa4412fd299a0be6b3dfe9d2597e2f1c20beb968f41d17" -dependencies = [ - "js-sys", - "wasm-bindgen", -] - -[[package]] -name = "webpki" -version = "0.21.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab146130f5f790d45f82aeeb09e55a256573373ec64409fc19a6fb82fb1032ae" -dependencies = [ - "ring", - "untrusted", -] - -[[package]] -name = "winapi" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" - -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-build" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - -[[package]] -name = "winreg" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0120db82e8a1e0b9fb3345a539c478767c0048d842860994d96113d5b667bd69" -dependencies = [ - "winapi 0.3.9", -] - -[[package]] -name = "ws2_32-sys" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" -dependencies = [ - "winapi 0.2.8", - "winapi-build", -] - -[[package]] -name = "yansi" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fc79f4a1e39857fc00c3f662cbf2651c771f00e9c15fe2abc341806bd46bd71" - -[[package]] -name = "zeroize" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3cbac2ed2ba24cc90f5e06485ac8c7c1e5449fe8911aef4d8877218af021a5b8" diff --git a/Cargo.toml b/Cargo.toml index 30af056..eaad710 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -29,16 +29,16 @@ thiserror = "1.0.19" image = { version = "0.23.4", default-features = false, features = ["jpeg", "png", "gif"] } [dependencies.ruma] -git = "https://github.com/timokoesters/ruma" -#rev = "baa87104569b45dc07a9a7a16d3c7592ab8f4d6b" +git = "https://github.com/DevinR528/ruma" +branch = "matrix-sdk2" #path = "../ruma/ruma" features = ["rand", "client-api", "federation-api"] # These are required only until ruma-events and ruma-federation-api are merged into ruma/ruma -[patch.crates-io] -ruma-common = { git = "https://github.com/timokoesters/ruma" } -ruma-serde = { git = "https://github.com/timokoesters/ruma" } -ruma-identifiers = { git = "https://github.com/timokoesters/ruma" } +# [patch.crates-io] +# ruma-common = { git = "https://github.com/ruma/ruma", rev = "baa87104569b45dc07a9a7a16d3c7592ab8f4d6b" } +# ruma-serde = { git = "https://github.com/ruma/ruma", rev = "baa87104569b45dc07a9a7a16d3c7592ab8f4d6b" } +# ruma-identifiers = { git = "https://github.com/ruma/ruma", rev = "baa87104569b45dc07a9a7a16d3c7592ab8f4d6b" } #ruma-common = { path = "../ruma/ruma-common" } #ruma-serde = { path = "../ruma/ruma-serde" } #ruma-identifiers = { path = "../ruma/ruma-identifiers" } diff --git a/src/client_server.rs b/src/client_server.rs index f1a9dbe..5a20eb3 100644 --- a/src/client_server.rs +++ b/src/client_server.rs @@ -60,12 +60,11 @@ use ruma::{ unversioned::get_supported_versions, }, events::{ - collections::only::Event as EduEvent, room::{ canonical_alias, guest_access, history_visibility, join_rules, member, name, redaction, topic, }, - EventJson, EventType, + AnyBasicEvent, AnyEphemeralRoomEvent, AnyEvent as EduEvent, EventJson, EventType, }, identifiers::{RoomAliasId, RoomId, RoomVersionId, UserId}, }; @@ -77,7 +76,7 @@ const TOKEN_LENGTH: usize = 256; const MXC_LENGTH: usize = 256; const SESSION_ID_LENGTH: usize = 256; -#[get("/_matrix/client/versions")] +// #[get("/_matrix/client/versions")] pub fn get_supported_versions_route() -> ConduitResult { let mut unstable_features = BTreeMap::new(); @@ -90,7 +89,7 @@ pub fn get_supported_versions_route() -> ConduitResult, body: Ruma, @@ -120,7 +119,7 @@ pub fn get_register_available_route( Ok(get_username_availability::Response { available: true }.into()) } -#[post("/_matrix/client/r0/register", data = "")] +// #[post("/_matrix/client/r0/register", data = "")] pub fn register_route( db: State<'_, Database>, body: Ruma, @@ -226,7 +225,7 @@ pub fn register_route( .into()) } -#[get("/_matrix/client/r0/login")] +// #[get("/_matrix/client/r0/login")] pub fn get_login_route() -> ConduitResult { Ok(get_login_types::Response { flows: vec![get_login_types::LoginType::Password], @@ -234,7 +233,7 @@ pub fn get_login_route() -> ConduitResult { .into()) } -#[post("/_matrix/client/r0/login", data = "")] +// #[post("/_matrix/client/r0/login", data = "")] pub fn login_route( db: State<'_, Database>, body: Ruma, @@ -285,14 +284,14 @@ pub fn login_route( Ok(login::Response { user_id, access_token: token, - home_server: Some(db.globals.server_name().to_owned()), + home_server: Some(db.globals.server_name().to_string()), device_id, well_known: None, } .into()) } -#[post("/_matrix/client/r0/logout", data = "")] +// #[post("/_matrix/client/r0/logout", data = "")] pub fn logout_route( db: State<'_, Database>, body: Ruma, @@ -473,14 +472,14 @@ pub fn get_capabilities_route() -> ConduitResult { .into()) } -#[get("/_matrix/client/r0/pushrules", data = "")] +// #[get("/_matrix/client/r0/pushrules", data = "")] pub fn get_pushrules_all_route( db: State<'_, Database>, body: Ruma, ) -> ConduitResult { let user_id = body.user_id.as_ref().expect("user is authenticated"); - if let EduEvent::PushRules(pushrules) = db + if let EduEvent::Basic(AnyBasicEvent::PushRules(pushrules)) = db .account_data .get(None, &user_id, &EventType::PushRules)? .ok_or(Error::BadRequest( @@ -515,7 +514,7 @@ pub fn set_pushrule_route( Ok(set_pushrule::Response.into()) } -#[put("/_matrix/client/r0/pushrules/<_scope>/<_kind>/<_rule_id>/enabled")] +// #[put("/_matrix/client/r0/pushrules/<_scope>/<_kind>/<_rule_id>/enabled")] pub fn set_pushrule_enabled_route( _scope: String, _kind: String, @@ -526,7 +525,7 @@ pub fn set_pushrule_enabled_route( Ok(set_pushrule_enabled::Response.into()) } -#[get("/_matrix/client/r0/user/<_user_id>/filter/<_filter_id>")] +// #[get("/_matrix/client/r0/user/<_user_id>/filter/<_filter_id>")] pub fn get_filter_route( _user_id: String, _filter_id: String, @@ -544,7 +543,7 @@ pub fn get_filter_route( .into()) } -#[post("/_matrix/client/r0/user/<_user_id>/filter")] +// #[post("/_matrix/client/r0/user/<_user_id>/filter")] pub fn create_filter_route(_user_id: String) -> ConduitResult { // TODO Ok(create_filter::Response { @@ -553,10 +552,10 @@ pub fn create_filter_route(_user_id: String) -> ConduitResult/account_data/<_type>", - data = "" -)] +// #[put( +// "/_matrix/client/r0/user/<_user_id>/account_data/<_type>", +// data = "" +// )] pub fn set_global_account_data_route( db: State<'_, Database>, body: Ruma, @@ -582,10 +581,10 @@ pub fn set_global_account_data_route( Ok(set_global_account_data::Response.into()) } -#[get( - "/_matrix/client/r0/user/<_user_id>/account_data/<_type>", - data = "" -)] +// #[get( +// "/_matrix/client/r0/user/<_user_id>/account_data/<_type>", +// data = "" +// )] pub fn get_global_account_data_route( db: State<'_, Database>, body: Ruma, @@ -603,10 +602,19 @@ pub fn get_global_account_data_route( )? .ok_or(Error::BadRequest(ErrorKind::NotFound, "Data not found."))?; - Ok(get_global_account_data::Response { account_data: data }.into()) + // TODO clearly this is not ideal... + // NOTE: EventJson is no longer needed as all the enums and event structs impl ser/de + let data: Result = data.deserialize().map_err(Into::into); + match data? { + EduEvent::Basic(data) => Ok(get_global_account_data::Response { + account_data: EventJson::from(data), + } + .into()), + _ => panic!("timo what do i do here"), + } } -#[put("/_matrix/client/r0/profile/<_user_id>/displayname", data = "")] +// #[put("/_matrix/client/r0/profile/<_user_id>/displayname", data = "")] pub fn set_displayname_route( db: State<'_, Database>, body: Ruma, @@ -672,7 +680,7 @@ pub fn set_displayname_route( Ok(set_display_name::Response.into()) } -#[get("/_matrix/client/r0/profile/<_user_id>/displayname", data = "")] +// #[get("/_matrix/client/r0/profile/<_user_id>/displayname", data = "")] pub fn get_displayname_route( db: State<'_, Database>, body: Ruma, @@ -685,7 +693,7 @@ pub fn get_displayname_route( .into()) } -#[put("/_matrix/client/r0/profile/<_user_id>/avatar_url", data = "")] +// #[put("/_matrix/client/r0/profile/<_user_id>/avatar_url", data = "")] pub fn set_avatar_url_route( db: State<'_, Database>, body: Ruma, @@ -762,7 +770,7 @@ pub fn set_avatar_url_route( Ok(set_avatar_url::Response.into()) } -#[get("/_matrix/client/r0/profile/<_user_id>/avatar_url", data = "")] +// #[get("/_matrix/client/r0/profile/<_user_id>/avatar_url", data = "")] pub fn get_avatar_url_route( db: State<'_, Database>, body: Ruma, @@ -775,7 +783,7 @@ pub fn get_avatar_url_route( .into()) } -#[get("/_matrix/client/r0/profile/<_user_id>", data = "")] +// #[get("/_matrix/client/r0/profile/<_user_id>", data = "")] pub fn get_profile_route( db: State<'_, Database>, body: Ruma, @@ -800,7 +808,7 @@ pub fn get_profile_route( .into()) } -#[put("/_matrix/client/r0/presence/<_user_id>/status", data = "")] +// #[put("/_matrix/client/r0/presence/<_user_id>/status", data = "")] pub fn set_presence_route( db: State<'_, Database>, body: Ruma, @@ -830,7 +838,7 @@ pub fn set_presence_route( Ok(set_presence::Response.into()) } -#[post("/_matrix/client/r0/keys/upload", data = "")] +// #[post("/_matrix/client/r0/keys/upload", data = "")] pub fn upload_keys_route( db: State<'_, Database>, body: Ruma, @@ -859,7 +867,7 @@ pub fn upload_keys_route( .into()) } -#[post("/_matrix/client/r0/keys/query", data = "")] +// #[post("/_matrix/client/r0/keys/query", data = "")] pub fn get_keys_route( db: State<'_, Database>, body: Ruma, @@ -936,7 +944,7 @@ pub fn get_keys_route( .into()) } -#[post("/_matrix/client/r0/keys/claim", data = "")] +// #[post("/_matrix/client/r0/keys/claim", data = "")] pub fn claim_keys_route( db: State<'_, Database>, body: Ruma, @@ -1099,7 +1107,7 @@ pub fn set_read_marker_route( content: ruma::events::fully_read::FullyReadEventContent { event_id: body.fully_read.clone(), }, - room_id: Some(body.room_id.clone()), + room_id: body.room_id.clone(), }) .expect("we just created a valid event") .as_object_mut() @@ -1135,20 +1143,22 @@ pub fn set_read_marker_route( db.rooms.edus.roomlatest_update( &user_id, &body.room_id, - EduEvent::Receipt(ruma::events::receipt::ReceiptEvent { - content: receipt_content, - room_id: None, // None because it can be inferred - }), + EduEvent::Ephemeral(AnyEphemeralRoomEvent::Receipt( + ruma::events::receipt::ReceiptEvent { + content: ruma::events::receipt::ReceiptEventContent(receipt_content), + room_id: body.room_id.clone(), + }, + )), &db.globals, )?; } Ok(set_read_marker::Response.into()) } -#[put( - "/_matrix/client/r0/rooms/<_room_id>/typing/<_user_id>", - data = "" -)] +// #[put( +// "/_matrix/client/r0/rooms/<_room_id>/typing/<_user_id>", +// data = "" +// )] pub fn create_typing_event_route( db: State<'_, Database>, body: Ruma, @@ -1174,15 +1184,14 @@ pub fn create_typing_event_route( Ok(create_typing_event::Response.into()) } -#[post("/_matrix/client/r0/createRoom", data = "")] +// #[post("/_matrix/client/r0/createRoom", data = "")] pub fn create_room_route( db: State<'_, Database>, body: Ruma, ) -> ConduitResult { let user_id = body.user_id.as_ref().expect("user is authenticated"); - let room_id = RoomId::new(db.globals.server_name()) - .map_err(|_| Error::bad_database("Server name is invalid."))?; + let room_id = RoomId::new(db.globals.server_name()); let alias = body .room_alias_name @@ -1439,10 +1448,10 @@ pub fn create_room_route( Ok(create_room::Response { room_id }.into()) } -#[put( - "/_matrix/client/r0/rooms/<_room_id>/redact/<_event_id>/<_txn_id>", - data = "" -)] +// #[put( +// "/_matrix/client/r0/rooms/<_room_id>/redact/<_event_id>/<_txn_id>", +// data = "" +// )] pub fn redact_event_route( db: State<'_, Database>, body: Ruma, @@ -1469,7 +1478,7 @@ pub fn redact_event_route( Ok(redact_event::Response { event_id }.into()) } -#[put("/_matrix/client/r0/directory/room/<_room_alias>", data = "")] +// #[put("/_matrix/client/r0/directory/room/<_room_alias>", data = "")] pub fn create_alias_route( db: State<'_, Database>, body: Ruma, @@ -1485,7 +1494,7 @@ pub fn create_alias_route( Ok(create_alias::Response.into()) } -#[delete("/_matrix/client/r0/directory/room/<_room_alias>", data = "")] +// #[delete("/_matrix/client/r0/directory/room/<_room_alias>", data = "")] pub fn delete_alias_route( db: State<'_, Database>, body: Ruma, @@ -1496,7 +1505,7 @@ pub fn delete_alias_route( Ok(delete_alias::Response.into()) } -#[get("/_matrix/client/r0/directory/room/<_room_alias>", data = "")] +// #[get("/_matrix/client/r0/directory/room/<_room_alias>", data = "")] pub fn get_alias_route( db: State<'_, Database>, body: Ruma, @@ -1516,12 +1525,12 @@ pub fn get_alias_route( Ok(get_alias::Response { room_id, - servers: vec![db.globals.server_name().to_owned()], + servers: vec![db.globals.server_name().to_string()], } .into()) } -#[post("/_matrix/client/r0/rooms/<_room_id>/join", data = "")] +// #[post("/_matrix/client/r0/rooms/<_room_id>/join", data = "")] pub fn join_room_by_id_route( db: State<'_, Database>, body: Ruma, @@ -1556,7 +1565,7 @@ pub fn join_room_by_id_route( .into()) } -#[post("/_matrix/client/r0/join/<_room_id_or_alias>", data = "")] +// #[post("/_matrix/client/r0/join/<_room_id_or_alias>", data = "")] pub fn join_room_by_id_or_alias_route( db: State<'_, Database>, body: Ruma, @@ -1585,7 +1594,7 @@ pub fn join_room_by_id_or_alias_route( .into()) } -#[post("/_matrix/client/r0/rooms/<_room_id>/leave", data = "")] +// #[post("/_matrix/client/r0/rooms/<_room_id>/leave", data = "")] pub fn leave_room_route( db: State<'_, Database>, body: Ruma, @@ -1623,7 +1632,7 @@ pub fn leave_room_route( Ok(leave_room::Response.into()) } -#[post("/_matrix/client/r0/rooms/<_room_id>/kick", data = "")] +// #[post("/_matrix/client/r0/rooms/<_room_id>/kick", data = "")] pub fn kick_user_route( db: State<'_, Database>, body: Ruma, @@ -1663,7 +1672,7 @@ pub fn kick_user_route( Ok(kick_user::Response.into()) } -#[post("/_matrix/client/r0/rooms/<_room_id>/ban", data = "")] +// #[post("/_matrix/client/r0/rooms/<_room_id>/ban", data = "")] pub fn ban_user_route( db: State<'_, Database>, body: Ruma, @@ -1710,7 +1719,7 @@ pub fn ban_user_route( Ok(ban_user::Response.into()) } -#[post("/_matrix/client/r0/rooms/<_room_id>/unban", data = "")] +// #[post("/_matrix/client/r0/rooms/<_room_id>/unban", data = "")] pub fn unban_user_route( db: State<'_, Database>, body: Ruma, @@ -1749,7 +1758,7 @@ pub fn unban_user_route( Ok(unban_user::Response.into()) } -#[post("/_matrix/client/r0/rooms/<_room_id>/forget", data = "")] +// #[post("/_matrix/client/r0/rooms/<_room_id>/forget", data = "")] pub fn forget_room_route( db: State<'_, Database>, body: Ruma, @@ -1762,7 +1771,7 @@ pub fn forget_room_route( Ok(forget_room::Response.into()) } -#[post("/_matrix/client/r0/rooms/<_room_id>/invite", data = "")] +// #[post("/_matrix/client/r0/rooms/<_room_id>/invite", data = "")] pub fn invite_user_route( db: State<'_, Database>, body: Ruma, @@ -1793,7 +1802,7 @@ pub fn invite_user_route( } } -#[put("/_matrix/client/r0/directory/list/room/<_room_id>", data = "")] +// #[put("/_matrix/client/r0/directory/list/room/<_room_id>", data = "")] pub async fn set_room_visibility_route( db: State<'_, Database>, body: Ruma, @@ -1807,7 +1816,7 @@ pub async fn set_room_visibility_route( Ok(set_room_visibility::Response.into()) } -#[get("/_matrix/client/r0/directory/list/room/<_room_id>", data = "")] +// #[get("/_matrix/client/r0/directory/list/room/<_room_id>", data = "")] pub async fn get_room_visibility_route( db: State<'_, Database>, body: Ruma, @@ -1823,7 +1832,7 @@ pub async fn get_room_visibility_route( .into()) } -#[get("/_matrix/client/r0/publicRooms", data = "")] +// #[get("/_matrix/client/r0/publicRooms", data = "")] pub async fn get_public_rooms_route( db: State<'_, Database>, body: Ruma, @@ -1872,7 +1881,7 @@ pub async fn get_public_rooms_route( .into()) } -#[post("/_matrix/client/r0/publicRooms", data = "")] +// #[post("/_matrix/client/r0/publicRooms", data = "")] pub async fn get_public_rooms_filtered_route( db: State<'_, Database>, body: Ruma, @@ -1984,7 +1993,7 @@ pub async fn get_public_rooms_filtered_route( .into()) } -#[post("/_matrix/client/r0/user_directory/search", data = "")] +// #[post("/_matrix/client/r0/user_directory/search", data = "")] pub fn search_users_route( db: State<'_, Database>, body: Ruma, @@ -2050,7 +2059,7 @@ pub fn get_member_events_route( .into()) } -#[get("/_matrix/client/r0/thirdparty/protocols")] +// #[get("/_matrix/client/r0/thirdparty/protocols")] pub fn get_protocols_route() -> ConduitResult { warn!("TODO: get_protocols_route"); Ok(get_protocols::Response { @@ -2124,7 +2133,7 @@ pub fn create_message_event_route( } #[put( - "/_matrix/client/r0/rooms/<_room_id>/state/<_event_type>/<_state_key>", + // "/_matrix/client/r0/rooms/<_room_id>/state/<_event_type>/<_state_key>", data = "" )] pub fn create_state_event_for_key_route( @@ -2185,10 +2194,10 @@ pub fn create_state_event_for_key_route( Ok(create_state_event_for_key::Response { event_id }.into()) } -#[put( - "/_matrix/client/r0/rooms/<_room_id>/state/<_event_type>", - data = "" -)] +// #[put( +// "/_matrix/client/r0/rooms/<_room_id>/state/<_event_type>", +// data = "" +// )] pub fn create_state_event_for_empty_key_route( db: State<'_, Database>, body: Ruma, @@ -2232,7 +2241,7 @@ pub fn create_state_event_for_empty_key_route( .into()) } -#[get("/_matrix/client/r0/rooms/<_room_id>/state", data = "")] +// #[get("/_matrix/client/r0/rooms/<_room_id>/state", data = "")] pub fn get_state_events_route( db: State<'_, Database>, body: Ruma, @@ -2258,10 +2267,10 @@ pub fn get_state_events_route( .into()) } -#[get( - "/_matrix/client/r0/rooms/<_room_id>/state/<_event_type>/<_state_key>", - data = "" -)] +// #[get( +// "/_matrix/client/r0/rooms/<_room_id>/state/<_event_type>/<_state_key>", +// data = "" +// )] pub fn get_state_events_for_key_route( db: State<'_, Database>, body: Ruma, @@ -2293,10 +2302,10 @@ pub fn get_state_events_for_key_route( .into()) } -#[get( - "/_matrix/client/r0/rooms/<_room_id>/state/<_event_type>", - data = "" -)] +// #[get( +// "/_matrix/client/r0/rooms/<_room_id>/state/<_event_type>", +// data = "" +// )] pub fn get_state_events_for_empty_key_route( db: State<'_, Database>, body: Ruma, @@ -2327,7 +2336,7 @@ pub fn get_state_events_for_empty_key_route( .into()) } -#[get("/_matrix/client/r0/sync", data = "")] +// #[get("/_matrix/client/r0/sync", data = "")] pub fn sync_route( db: State<'_, Database>, body: Ruma, @@ -2522,9 +2531,9 @@ pub fn sync_route( { edus.push( serde_json::from_str( - &serde_json::to_string(&EduEvent::Typing( + &serde_json::to_string(&EduEvent::Ephemeral(AnyEphemeralRoomEvent::Typing( db.rooms.edus.roomactives_all(&room_id)?, - )) + ))) .expect("event is valid, we just created it"), ) .expect("event is valid, we just created it"), @@ -2537,7 +2546,13 @@ pub fn sync_route( .account_data .changes_since(Some(&room_id), &user_id, since)? .into_iter() - .map(|(_, v)| v) + .flat_map(|(_, v)| { + if let Some(EduEvent::Basic(account_event)) = v.deserialize().ok() { + Some(EventJson::from(account_event)) + } else { + None + } + }) .collect(), }, summary: sync_events::RoomSummary { @@ -2701,10 +2716,10 @@ pub fn sync_route( .into()) } -#[get( - "/_matrix/client/r0/rooms/<_room_id>/context/<_event_id>", - data = "" -)] +// #[get( +// "/_matrix/client/r0/rooms/<_room_id>/context/<_event_id>", +// data = "" +// )] pub fn get_context_route( db: State<'_, Database>, body: Ruma, @@ -2802,7 +2817,7 @@ pub fn get_context_route( .into()) } -#[get("/_matrix/client/r0/rooms/<_room_id>/messages", data = "")] +// #[get("/_matrix/client/r0/rooms/<_room_id>/messages", data = "")] pub fn get_message_events_route( db: State<'_, Database>, body: Ruma, @@ -2824,15 +2839,16 @@ pub fn get_message_events_route( .map_err(|_| Error::BadRequest(ErrorKind::InvalidParam, "Invalid `from` value."))?; match body.dir { get_message_events::Direction::Forward => { + let limit = body + .limit + .try_into() + .map_or(Ok::<_, Error>(10_usize), |l: u32| Ok(l as usize))?; + let events_after = db .rooms .pdus_after(&user_id, &body.room_id, from) // Use limit or else 10 - .take(body.limit.map_or(Ok::<_, Error>(10_usize), |l| { - Ok(u32::try_from(l).map_err(|_| { - Error::BadRequest(ErrorKind::InvalidParam, "Limit value is invalid.") - })? as usize) - })?) + .take(limit) .filter_map(|r| r.ok()) // Filter out buggy events .collect::>(); @@ -2859,15 +2875,16 @@ pub fn get_message_events_route( .into()) } get_message_events::Direction::Backward => { + let limit = body + .limit + .try_into() + .map_or(Ok::<_, Error>(10_usize), |l: u32| Ok(l as usize))?; + let events_before = db .rooms .pdus_until(&user_id, &body.room_id, from) // Use limit or else 10 - .take(body.limit.map_or(Ok::<_, Error>(10_usize), |l| { - Ok(u32::try_from(l).map_err(|_| { - Error::BadRequest(ErrorKind::InvalidParam, "Limit value is invalid.") - })? as usize) - })?) + .take(limit) .filter_map(|r| r.ok()) // Filter out buggy events .collect::>(); @@ -2896,7 +2913,7 @@ pub fn get_message_events_route( } } -#[get("/_matrix/client/r0/voip/turnServer")] +// #[get("/_matrix/client/r0/voip/turnServer")] pub fn turn_server_route() -> ConduitResult { Err(Error::BadRequest( ErrorKind::NotFound, @@ -2904,7 +2921,7 @@ pub fn turn_server_route() -> ConduitResult { )) } -#[post("/_matrix/client/r0/publicised_groups")] +// #[post("/_matrix/client/r0/publicised_groups")] pub fn publicised_groups_route() -> ConduitResult { Err(Error::BadRequest( ErrorKind::NotFound, @@ -2912,10 +2929,10 @@ pub fn publicised_groups_route() -> ConduitResult/<_txn_id>", - data = "" -)] +// #[put( +// "/_matrix/client/r0/sendToDevice/<_event_type>/<_txn_id>", +// data = "" +// )] pub fn send_event_to_device_route( db: State<'_, Database>, body: Ruma, @@ -2961,7 +2978,7 @@ pub fn send_event_to_device_route( Ok(send_event_to_device::Response.into()) } -#[get("/_matrix/media/r0/config")] +// #[get("/_matrix/media/r0/config")] pub fn get_media_config_route() -> ConduitResult { Ok(get_media_config::Response { upload_size: (20_u32 * 1024 * 1024).into(), // 20 MB @@ -2969,7 +2986,7 @@ pub fn get_media_config_route() -> ConduitResult { .into()) } -#[post("/_matrix/media/r0/upload", data = "")] +// #[post("/_matrix/media/r0/upload", data = "")] pub fn create_content_route( db: State<'_, Database>, body: Ruma, @@ -2989,10 +3006,10 @@ pub fn create_content_route( Ok(create_content::Response { content_uri: mxc }.into()) } -#[get( - "/_matrix/media/r0/download/<_server_name>/<_media_id>", - data = "" -)] +// #[get( +// "/_matrix/media/r0/download/<_server_name>/<_media_id>", +// data = "" +// )] pub fn get_content_route( db: State<'_, Database>, body: Ruma, @@ -3014,10 +3031,10 @@ pub fn get_content_route( } } -#[get( - "/_matrix/media/r0/thumbnail/<_server_name>/<_media_id>", - data = "" -)] +// #[get( +// "/_matrix/media/r0/thumbnail/<_server_name>/<_media_id>", +// data = "" +// )] pub fn get_content_thumbnail_route( db: State<'_, Database>, body: Ruma, @@ -3039,7 +3056,7 @@ pub fn get_content_thumbnail_route( } } -#[get("/_matrix/client/r0/devices", data = "")] +// #[get("/_matrix/client/r0/devices", data = "")] pub fn get_devices_route( db: State<'_, Database>, body: Ruma, @@ -3055,7 +3072,7 @@ pub fn get_devices_route( Ok(get_devices::Response { devices }.into()) } -#[get("/_matrix/client/r0/devices/<_device_id>", data = "")] +// #[get("/_matrix/client/r0/devices/<_device_id>", data = "")] pub fn get_device_route( db: State<'_, Database>, body: Ruma, @@ -3071,7 +3088,7 @@ pub fn get_device_route( Ok(get_device::Response { device }.into()) } -#[put("/_matrix/client/r0/devices/<_device_id>", data = "")] +// #[put("/_matrix/client/r0/devices/<_device_id>", data = "")] pub fn update_device_route( db: State<'_, Database>, body: Ruma, @@ -3092,7 +3109,7 @@ pub fn update_device_route( Ok(update_device::Response.into()) } -#[delete("/_matrix/client/r0/devices/<_device_id>", data = "")] +// #[delete("/_matrix/client/r0/devices/<_device_id>", data = "")] pub fn delete_device_route( db: State<'_, Database>, body: Ruma, @@ -3136,7 +3153,7 @@ pub fn delete_device_route( Ok(delete_device::Response.into()) } -#[post("/_matrix/client/r0/delete_devices", data = "")] +// #[post("/_matrix/client/r0/delete_devices", data = "")] pub fn delete_devices_route( db: State<'_, Database>, body: Ruma, diff --git a/src/database/account_data.rs b/src/database/account_data.rs index befd937..3b64ba7 100644 --- a/src/database/account_data.rs +++ b/src/database/account_data.rs @@ -1,7 +1,7 @@ use crate::{utils, Error, Result}; use ruma::{ api::client::error::ErrorKind, - events::{collections::only::Event as EduEvent, EventJson, EventType}, + events::{AnyEvent as EduEvent, EventJson, EventType}, identifiers::{RoomId, UserId}, }; use std::{collections::HashMap, convert::TryFrom}; diff --git a/src/database/globals.rs b/src/database/globals.rs index a767d8a..00e0982 100644 --- a/src/database/globals.rs +++ b/src/database/globals.rs @@ -1,12 +1,14 @@ -use crate::{utils, Error, Result}; +use std::convert::TryFrom; +use crate::{utils, Error, Result}; +use ruma::identifiers::{ServerName, ServerNameRef}; pub const COUNTER: &str = "c"; pub struct Globals { pub(super) globals: sled::Tree, keypair: ruma::signatures::Ed25519KeyPair, reqwest_client: reqwest::Client, - server_name: String, + server_name: ServerName, registration_disabled: bool, } @@ -24,10 +26,13 @@ impl Globals { globals, keypair, reqwest_client: reqwest::Client::new(), - server_name: config - .get_str("server_name") - .unwrap_or("localhost") - .to_owned(), + server_name: ServerName::try_from( + config + .get_str("server_name") + .unwrap_or("localhost") + .to_owned(), + ) + .map_err(|_| Error::bad_database("Invalid server name"))?, registration_disabled: config.get_bool("registration_disabled").unwrap_or(false), }) } @@ -59,8 +64,8 @@ impl Globals { }) } - pub fn server_name(&self) -> &str { - &self.server_name + pub fn server_name(&self) -> ServerNameRef<'_> { + self.server_name.as_ref() } pub fn registration_disabled(&self) -> bool { diff --git a/src/database/rooms.rs b/src/database/rooms.rs index b7f7221..d29ab42 100644 --- a/src/database/rooms.rs +++ b/src/database/rooms.rs @@ -515,7 +515,7 @@ impl Rooms { event_id: EventId::try_from("$thiswillbefilledinlater").expect("we know this is valid"), room_id: room_id.clone(), sender: sender.clone(), - origin: globals.server_name().to_owned(), + origin: globals.server_name().to_string(), origin_server_ts: utils::millis_since_unix_epoch() .try_into() .expect("time is valid"), @@ -529,7 +529,7 @@ impl Rooms { auth_events: Vec::new(), redacts: redacts.clone(), unsigned, - hashes: ruma::api::federation::EventHash { + hashes: ruma::events::pdu::EventHash { sha256: "aaa".to_owned(), }, signatures: HashMap::new(), @@ -547,7 +547,7 @@ impl Rooms { let mut pdu_json = serde_json::to_value(&pdu).expect("event is valid, we just created it"); ruma::signatures::hash_and_sign_event( - globals.server_name(), + globals.server_name().as_str(), globals.keypair(), &mut pdu_json, ) diff --git a/src/database/rooms/edus.rs b/src/database/rooms/edus.rs index 645ccb0..de138b6 100644 --- a/src/database/rooms/edus.rs +++ b/src/database/rooms/edus.rs @@ -1,6 +1,6 @@ use crate::{utils, Error, Result}; use ruma::{ - events::{collections::only::Event as EduEvent, EventJson}, + events::{AnyEvent as EduEvent, EventJson}, identifiers::{RoomId, UserId}, }; use std::convert::TryFrom; @@ -235,7 +235,7 @@ impl RoomEdus { Ok(ruma::events::typing::TypingEvent { content: ruma::events::typing::TypingEventContent { user_ids }, - room_id: None, // Can be inferred + room_id: room_id.clone(), // Can be inferred }) } diff --git a/src/database/users.rs b/src/database/users.rs index 2ccf59a..4e2e1a2 100644 --- a/src/database/users.rs +++ b/src/database/users.rs @@ -8,7 +8,7 @@ use ruma::{ keys::{AlgorithmAndDeviceId, CrossSigningKey, DeviceKeys, KeyAlgorithm, OneTimeKey}, }, }, - events::{to_device::AnyToDeviceEvent, EventJson, EventType}, + events::{AnyToDeviceEvent, EventJson, EventType}, identifiers::UserId, }; use std::{collections::BTreeMap, convert::TryFrom, time::SystemTime}; diff --git a/src/error.rs b/src/error.rs index 7305073..e1af15a 100644 --- a/src/error.rs +++ b/src/error.rs @@ -25,6 +25,11 @@ pub enum Error { #[from] source: image::error::ImageError, }, + #[error("Could not deserialize json")] + SerdeError { + #[from] + source: serde_json::Error, + }, #[error("{0}")] BadConfig(&'static str), #[error("{0}")] diff --git a/src/pdu.rs b/src/pdu.rs index 8a5858e..4504ae6 100644 --- a/src/pdu.rs +++ b/src/pdu.rs @@ -1,12 +1,9 @@ use crate::{Error, Result}; use js_int::UInt; use ruma::{ - api::federation::EventHash, events::{ - collections::all::{RoomEvent, StateEvent}, - room::member::MemberEvent, - stripped::AnyStrippedStateEvent, - EventJson, EventType, + pdu::EventHash, AnyRoomEvent, AnyStateEvent, AnyStrippedStateEventStub, EventJson, + EventType, }, identifiers::{EventId, RoomId, UserId}, }; @@ -81,19 +78,19 @@ impl PduEvent { Ok(()) } - pub fn to_room_event(&self) -> EventJson { + pub fn to_room_event(&self) -> EventJson { let json = serde_json::to_string(&self).expect("PDUs are always valid"); - serde_json::from_str::>(&json) + serde_json::from_str::>(&json) .expect("EventJson::from_str always works") } - pub fn to_state_event(&self) -> EventJson { + pub fn to_state_event(&self) -> EventJson { let json = serde_json::to_string(&self).expect("PDUs are always valid"); - serde_json::from_str::>(&json) + serde_json::from_str::>(&json) .expect("EventJson::from_str always works") } - pub fn to_stripped_state_event(&self) -> EventJson { + pub fn to_stripped_state_event(&self) -> EventJson { let json = serde_json::to_string(&self).expect("PDUs are always valid"); - serde_json::from_str::>(&json) + serde_json::from_str::>(&json) .expect("EventJson::from_str always works") } pub fn to_member_event(&self) -> EventJson {