1
0
Fork 0
mirror of https://gitlab.com/famedly/conduit.git synced 2024-12-25 07:34:36 +01:00

Update to latest ruma/ruma commit

This will most likely be the API that is released to crates.io so it
should be fairly stable...
This commit is contained in:
Devin R 2020-07-17 16:00:39 -04:00
parent 63e23154f3
commit d02685a4fd
8 changed files with 205 additions and 217 deletions

309
Cargo.lock generated
View file

@ -2,13 +2,19 @@
# It is not intended for manual editing.
[[package]]
name = "addr2line"
version = "0.12.2"
version = "0.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "602d785912f476e480434627e8732e6766b760c045bbf897d9dfaa9f4fbd399c"
checksum = "1b6a2d3371669ab3ca9797670853d61402b03d0b4b9ebf33d677dfa720203072"
dependencies = [
"gimli",
]
[[package]]
name = "adler"
version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ee2a4ec343196209d6594e19543ae87a39f96d5534d7174822a3ad825dd6ed7e"
[[package]]
name = "adler32"
version = "1.1.0"
@ -21,6 +27,12 @@ version = "0.4.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4d25d88fd6b8041580a654f9d0c581a047baee2b3efee13275f2fc392fc75034"
[[package]]
name = "array-init"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f30bbe2f5e3d117f55bd8c7a1f9191e4a5deba9f15f595bbea4f670c59c765db"
[[package]]
name = "arrayref"
version = "0.3.6"
@ -41,7 +53,7 @@ checksum = "a265e3abeffdce30b2e26b7a11b222fe37c6067404001b434101457d0385eb92"
dependencies = [
"proc-macro2 1.0.18",
"quote 1.0.7",
"syn 1.0.33",
"syn 1.0.34",
]
[[package]]
@ -63,14 +75,14 @@ checksum = "f8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9d"
[[package]]
name = "backtrace"
version = "0.3.49"
version = "0.3.50"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "05100821de9e028f12ae3d189176b41ee198341eb8f369956407fea2f5cc666c"
checksum = "46254cf2fdcdf1badb5934448c1bcbe046a56537b3987d96c51a7afc5d03f293"
dependencies = [
"addr2line",
"cfg-if",
"libc",
"miniz_oxide",
"miniz_oxide 0.4.0",
"object",
"rustc-demangle",
]
@ -139,18 +151,15 @@ checksum = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de"
[[package]]
name = "bytes"
version = "0.5.5"
version = "0.5.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "118cf036fbb97d0816e3c34b2d7a1e8cfc60f68fcf63d550ddbe9bd5f59c213b"
dependencies = [
"loom",
]
checksum = "0e4cec68f03f32e44924783795810fa50a7035d8c8ebe78580ad7e6c703fba38"
[[package]]
name = "cc"
version = "1.0.55"
version = "1.0.58"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b1be3409f94d7bdceeb5f5fac551039d9b3f00e25da7a74fc4d33400a0d96368"
checksum = "f9a06fb2e53271d7c279ec1efea6ab691c35a2ae67ec0d91d7acec0caf13b518"
[[package]]
name = "cfg-if"
@ -160,9 +169,9 @@ checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822"
[[package]]
name = "cloudabi"
version = "0.0.3"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f"
checksum = "4344512281c643ae7638bbabc3af17a11307803ec8f0fcad9fae512a8bf36467"
dependencies = [
"bitflags",
]
@ -265,9 +274,9 @@ dependencies = [
[[package]]
name = "deflate"
version = "0.8.4"
version = "0.8.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e7e5d2a2273fed52a7f947ee55b092c4057025d7a3e04e5ecdbd25d6c3fb1bd7"
checksum = "73770f8e1fe7d64df17ca66ad28994a0a623ea497fa69486e14984e715c5d174"
dependencies = [
"adler32",
"byteorder",
@ -299,7 +308,7 @@ dependencies = [
"bitflags",
"proc-macro2 1.0.18",
"quote 1.0.7",
"syn 1.0.33",
"syn 1.0.34",
]
[[package]]
@ -452,7 +461,7 @@ dependencies = [
"proc-macro-hack",
"proc-macro2 1.0.18",
"quote 1.0.7",
"syn 1.0.33",
"syn 1.0.34",
]
[[package]]
@ -499,19 +508,6 @@ 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 = "getrandom"
version = "0.1.14"
@ -535,15 +531,15 @@ dependencies = [
[[package]]
name = "gimli"
version = "0.21.0"
version = "0.22.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bcc8e0c9bce37868955864dbecd2b1ab2bdf967e6f28066d65aaac620444b65c"
checksum = "aaf91faf136cb47367fa430cd46e37a788775e7fa104f8b4bcb3861dc389b724"
[[package]]
name = "h2"
version = "0.2.5"
version = "0.2.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "79b7246d7e4b979c03fa093da39cfb3617a96bbeee6310af63991668d7e843ff"
checksum = "993f9e0baeed60001cf565546b0d3dbe6a6ad23f2bd31644a133c641eccf6d53"
dependencies = [
"bytes",
"fnv",
@ -552,10 +548,10 @@ dependencies = [
"futures-util",
"http",
"indexmap",
"log",
"slab",
"tokio",
"tokio-util",
"tracing",
]
[[package]]
@ -569,9 +565,9 @@ dependencies = [
[[package]]
name = "hermit-abi"
version = "0.1.14"
version = "0.1.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b9586eedd4ce6b3c498bc3b4dd92fc9f11166aa908a914071953768066c67909"
checksum = "3deed196b6e7f9e44a2ae8d94225d80302d81208b1bb673fd21fe634645c85a9"
dependencies = [
"libc",
]
@ -605,9 +601,9 @@ checksum = "cd179ae861f0c2e53da70d892f5f3029f9594be0c41dc5269cd371691b1dc2f9"
[[package]]
name = "hyper"
version = "0.13.6"
version = "0.13.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a6e7655b9594024ad0ee439f3b5a7299369dc2a3f459b47c696f9ff676f9aa1f"
checksum = "3e68a8dd9716185d9e64ea473ea6ef63529252e3e27623295a0378a19665d5eb"
dependencies = [
"bytes",
"futures-channel",
@ -618,20 +614,20 @@ dependencies = [
"http-body",
"httparse",
"itoa",
"log",
"pin-project",
"socket2",
"time",
"tokio",
"tower-service",
"tracing",
"want",
]
[[package]]
name = "hyper-tls"
version = "0.4.1"
version = "0.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3adcd308402b9553630734e9c36b77a7e48b3821251ca2493e8cd596763aafaa"
checksum = "d979acc56dcb5b8dddba3917601745e877576475aa046df3226eabdecef78eed"
dependencies = [
"bytes",
"hyper",
@ -653,9 +649,9 @@ dependencies = [
[[package]]
name = "image"
version = "0.23.6"
version = "0.23.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b5b0553fec6407d63fe2975b794dfb099f3f790bdc958823851af37b26404ab4"
checksum = "a2397fc43bd5648b7117aabb3c5e62d0e62c194826ec77b0b4d0c41e62744635"
dependencies = [
"bytemuck",
"byteorder",
@ -676,6 +672,12 @@ dependencies = [
"autocfg",
]
[[package]]
name = "instant"
version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5b141fdc7836c525d4d594027d318c84161ca17aaf8113ab1f81ab93ae897485"
[[package]]
name = "iovec"
version = "0.1.4"
@ -693,18 +695,18 @@ checksum = "dc6f3ad7b9d11a0c00842ff8de1b60ee58661048eb8049ed33c73594f359d7e6"
[[package]]
name = "jpeg-decoder"
version = "0.1.19"
version = "0.1.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5b47b4c4e017b01abdc5bcc126d2d1002e5a75bbe3ce73f9f4f311a916363704"
checksum = "cc797adac5f083b8ff0ca6f6294a999393d76e197c36488e2ef732c4715f6fa3"
dependencies = [
"byteorder",
]
[[package]]
name = "js-sys"
version = "0.3.40"
version = "0.3.42"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ce10c23ad2ea25ceca0093bd3192229da4c5b3c0f2de499c1ecac0d98d452177"
checksum = "52732a3d3ad72c58ad2dc70624f9c17b46ecd0943b9a4f1ee37c4c18c5d983e2"
dependencies = [
"wasm-bindgen",
]
@ -736,39 +738,28 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
[[package]]
name = "libc"
version = "0.2.71"
version = "0.2.72"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9457b06509d27052635f90d6466700c65095fdf75409b3fbdd903e988b886f49"
checksum = "a9f8082297d534141b30c8d39e9b1773713ab50fdbe4ff30f750d063b3bfd701"
[[package]]
name = "lock_api"
version = "0.3.4"
version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c4da24a77a3d8a6d4862d95f72e6fdb9c09a643ecdb402d754004a557f2bec75"
checksum = "28247cc5a5be2f05fbcd76dd0cf2c7d3b5400cb978a28042abcd4fa0b3f8261c"
dependencies = [
"scopeguard",
]
[[package]]
name = "log"
version = "0.4.8"
version = "0.4.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7"
checksum = "4fabed175da42fed1fa0746b0ea71f412aa9d35e76e95e59b192c64b9dc2bf8b"
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"
@ -795,9 +786,9 @@ checksum = "3728d817d99e5ac407411fa471ff9800a778d88a24685968b36824eaf4bee400"
[[package]]
name = "memoffset"
version = "0.5.4"
version = "0.5.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b4fc2c02a7e374099d4ee95a193111f72d2110197fe200272371758f6c3643d8"
checksum = "c198b026e1bbf08a937e94c6c60f9ec4a2267f5b0d2eec9c1b21b061ce2be55f"
dependencies = [
"autocfg",
]
@ -827,6 +818,15 @@ dependencies = [
"adler32",
]
[[package]]
name = "miniz_oxide"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "be0f75932c1f6cfae3c04000e40114adf955636e19040f9c0a2c380702aa1c7f"
dependencies = [
"adler",
]
[[package]]
name = "mio"
version = "0.6.22"
@ -996,22 +996,24 @@ dependencies = [
[[package]]
name = "parking_lot"
version = "0.10.2"
version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d3a704eb390aafdc107b0e392f56a82b668e3a71366993b5340f5833fd62505e"
checksum = "a4893845fa2ca272e647da5d0e46660a314ead9c2fdd9a883aabc32e481a8733"
dependencies = [
"instant",
"lock_api",
"parking_lot_core",
]
[[package]]
name = "parking_lot_core"
version = "0.7.2"
version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d58c7c768d4ba344e3e8d72518ac13e259d7c7ade24167003b8488e10b6740a3"
checksum = "c361aa727dd08437f2f1447be8b59a33b0edd15e0fcee698f935613d9efbca9b"
dependencies = [
"cfg-if",
"cloudabi",
"instant",
"libc",
"redox_syscall",
"smallvec",
@ -1069,7 +1071,7 @@ checksum = "6a0ffd45cf79d88737d7cc85bfd5d2894bee1139b356e616fe85dc389c61aaf7"
dependencies = [
"proc-macro2 1.0.18",
"quote 1.0.7",
"syn 1.0.33",
"syn 1.0.34",
]
[[package]]
@ -1086,20 +1088,20 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"
[[package]]
name = "pkg-config"
version = "0.3.17"
version = "0.3.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "05da548ad6865900e60eaba7f589cc0783590a92e940c26953ff81ddbab2d677"
checksum = "d36492546b6af1463394d46f0c834346f31548646f6ba10849802c9c9a27ac33"
[[package]]
name = "png"
version = "0.16.5"
version = "0.16.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "34ccdd66f6fe4b2433b07e4728e9a013e43233120427046e93ceb709c3a439bf"
checksum = "c150bf7479fafe3dd8740dbe48cc33b2a3efb7b0fe3483aced8bbc39f6d0238d"
dependencies = [
"bitflags",
"crc32fast",
"deflate",
"miniz_oxide",
"miniz_oxide 0.3.7",
]
[[package]]
@ -1199,9 +1201,9 @@ dependencies = [
[[package]]
name = "redox_syscall"
version = "0.1.56"
version = "0.1.57"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2439c63f3f6139d1b57529d16bc3b8bb855230c8efcc5d3a896c8bea7c3b1e84"
checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce"
[[package]]
name = "redox_users"
@ -1333,7 +1335,7 @@ dependencies = [
[[package]]
name = "ruma"
version = "0.1.0"
source = "git+https://github.com/DevinR528/ruma?branch=key-sign#00edba94afa930c3a9674ac5565aa0c930b1d592"
source = "git+https://github.com/ruma/ruma?rev=848b225#848b22568106d05c5444f3fe46070d5aa16e422b"
dependencies = [
"ruma-api",
"ruma-client-api",
@ -1347,7 +1349,7 @@ dependencies = [
[[package]]
name = "ruma-api"
version = "0.16.1"
source = "git+https://github.com/DevinR528/ruma?branch=key-sign#00edba94afa930c3a9674ac5565aa0c930b1d592"
source = "git+https://github.com/ruma/ruma?rev=848b225#848b22568106d05c5444f3fe46070d5aa16e422b"
dependencies = [
"http",
"percent-encoding 2.1.0",
@ -1362,17 +1364,18 @@ dependencies = [
[[package]]
name = "ruma-api-macros"
version = "0.16.1"
source = "git+https://github.com/DevinR528/ruma?branch=key-sign#00edba94afa930c3a9674ac5565aa0c930b1d592"
source = "git+https://github.com/ruma/ruma?rev=848b225#848b22568106d05c5444f3fe46070d5aa16e422b"
dependencies = [
"matches",
"proc-macro2 1.0.18",
"quote 1.0.7",
"syn 1.0.33",
"syn 1.0.34",
]
[[package]]
name = "ruma-client-api"
version = "0.9.0"
source = "git+https://github.com/DevinR528/ruma?branch=key-sign#00edba94afa930c3a9674ac5565aa0c930b1d592"
source = "git+https://github.com/ruma/ruma?rev=848b225#848b22568106d05c5444f3fe46070d5aa16e422b"
dependencies = [
"http",
"js_int",
@ -1389,7 +1392,7 @@ dependencies = [
[[package]]
name = "ruma-common"
version = "0.1.3"
source = "git+https://github.com/DevinR528/ruma?branch=key-sign#00edba94afa930c3a9674ac5565aa0c930b1d592"
source = "git+https://github.com/ruma/ruma?rev=848b225#848b22568106d05c5444f3fe46070d5aa16e422b"
dependencies = [
"js_int",
"matches",
@ -1402,7 +1405,7 @@ dependencies = [
[[package]]
name = "ruma-events"
version = "0.21.3"
source = "git+https://github.com/DevinR528/ruma?branch=key-sign#00edba94afa930c3a9674ac5565aa0c930b1d592"
source = "git+https://github.com/ruma/ruma?rev=848b225#848b22568106d05c5444f3fe46070d5aa16e422b"
dependencies = [
"js_int",
"ruma-common",
@ -1417,21 +1420,23 @@ dependencies = [
[[package]]
name = "ruma-events-macros"
version = "0.21.3"
source = "git+https://github.com/DevinR528/ruma?branch=key-sign#00edba94afa930c3a9674ac5565aa0c930b1d592"
source = "git+https://github.com/ruma/ruma?rev=848b225#848b22568106d05c5444f3fe46070d5aa16e422b"
dependencies = [
"matches",
"proc-macro2 1.0.18",
"quote 1.0.7",
"syn 1.0.33",
"syn 1.0.34",
]
[[package]]
name = "ruma-federation-api"
version = "0.0.2"
source = "git+https://github.com/DevinR528/ruma?branch=key-sign#00edba94afa930c3a9674ac5565aa0c930b1d592"
source = "git+https://github.com/ruma/ruma?rev=848b225#848b22568106d05c5444f3fe46070d5aa16e422b"
dependencies = [
"js_int",
"matches",
"ruma-api",
"ruma-common",
"ruma-events",
"ruma-identifiers",
"ruma-serde",
@ -1441,9 +1446,10 @@ dependencies = [
[[package]]
name = "ruma-identifiers"
version = "0.16.2"
source = "git+https://github.com/DevinR528/ruma?branch=key-sign#00edba94afa930c3a9674ac5565aa0c930b1d592"
version = "0.17.0-pre.1"
source = "git+https://github.com/ruma/ruma?rev=848b225#848b22568106d05c5444f3fe46070d5aa16e422b"
dependencies = [
"matches",
"rand",
"serde",
"strum",
@ -1452,7 +1458,7 @@ dependencies = [
[[package]]
name = "ruma-serde"
version = "0.2.2"
source = "git+https://github.com/DevinR528/ruma?branch=key-sign#00edba94afa930c3a9674ac5565aa0c930b1d592"
source = "git+https://github.com/ruma/ruma?rev=848b225#848b22568106d05c5444f3fe46070d5aa16e422b"
dependencies = [
"form_urlencoded",
"itoa",
@ -1464,7 +1470,7 @@ dependencies = [
[[package]]
name = "ruma-signatures"
version = "0.6.0-dev.1"
source = "git+https://github.com/DevinR528/ruma?branch=key-sign#00edba94afa930c3a9674ac5565aa0c930b1d592"
source = "git+https://github.com/ruma/ruma?rev=848b225#848b22568106d05c5444f3fe46070d5aa16e422b"
dependencies = [
"base64 0.12.3",
"ring",
@ -1502,15 +1508,6 @@ 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"
@ -1540,12 +1537,6 @@ dependencies = [
"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"
@ -1585,21 +1576,6 @@ dependencies = [
"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"
@ -1617,14 +1593,14 @@ checksum = "2a0be94b04690fbaed37cddffc5c134bf537c8e3329d53e982fe04c374978f8e"
dependencies = [
"proc-macro2 1.0.18",
"quote 1.0.7",
"syn 1.0.33",
"syn 1.0.34",
]
[[package]]
name = "serde_json"
version = "1.0.55"
version = "1.0.56"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ec2c5d7e739bc07a3e73381a39d61fdb5f671c60c1df26a130690665803d8226"
checksum = "3433e879a558dde8b5e8feb2a04899cf34fdde1fafb894687e52105fc1162ac3"
dependencies = [
"itoa",
"ryu",
@ -1661,10 +1637,11 @@ checksum = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8"
[[package]]
name = "sled"
version = "0.32.0"
version = "0.32.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cdad3dc85d888056d3bd9954ffdf22d8a22701b6cd3aca4f6df4c436111898c4"
checksum = "7e3dbbb8ee10611bd1d020767c27599ccbbf8365f7e0ed7e54429cc8b9433ad8"
dependencies = [
"array-init",
"backtrace",
"crc32fast",
"crossbeam-epoch",
@ -1678,9 +1655,9 @@ dependencies = [
[[package]]
name = "smallvec"
version = "1.4.0"
version = "1.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c7cb5678e1615754284ec264d9bb5b4c27d2018577fd90ac0ceb578591ed5ee4"
checksum = "3757cb9d89161a2f24e1cf78efa0c1fcff485d18e3f55e0aa3480824ddaa0f3f"
[[package]]
name = "socket2"
@ -1724,7 +1701,7 @@ dependencies = [
"heck",
"proc-macro2 1.0.18",
"quote 1.0.7",
"syn 1.0.33",
"syn 1.0.34",
]
[[package]]
@ -1740,9 +1717,9 @@ dependencies = [
[[package]]
name = "syn"
version = "1.0.33"
version = "1.0.34"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e8d5d96e8cbb005d6959f119f773bfaebb5684296108fb32600c00cde305b2cd"
checksum = "936cae2873c940d92e697597c5eee105fb570cd5689c695806f672883653349b"
dependencies = [
"proc-macro2 1.0.18",
"quote 1.0.7",
@ -1780,7 +1757,7 @@ checksum = "bd80fc12f73063ac132ac92aceea36734f04a1d93c1240c6944e23a3b8841793"
dependencies = [
"proc-macro2 1.0.18",
"quote 1.0.7",
"syn 1.0.33",
"syn 1.0.34",
]
[[package]]
@ -1830,7 +1807,7 @@ checksum = "f0c3acc6aa564495a0f2e1d59fab677cd7f81a19994cfc7f3ad0e64301560389"
dependencies = [
"proc-macro2 1.0.18",
"quote 1.0.7",
"syn 1.0.33",
"syn 1.0.34",
]
[[package]]
@ -1885,10 +1862,30 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e987b6bf443f4b5b3b6f38704195592cca41c5bb7aedd3c3693c7081f8289860"
[[package]]
name = "try-lock"
version = "0.2.2"
name = "tracing"
version = "0.1.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e604eb7b43c06650e854be16a2a03155743d3752dd1c943f6829e26b7a36e382"
checksum = "c2e2a2de6b0d5cbb13fc21193a2296888eaab62b6044479aafb3c54c01c29fcd"
dependencies = [
"cfg-if",
"log",
"tracing-core",
]
[[package]]
name = "tracing-core"
version = "0.1.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "94ae75f0d28ae10786f3b1895c55fe72e79928fd5ccdebb5438c75e93fec178f"
dependencies = [
"lazy_static",
]
[[package]]
name = "try-lock"
version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642"
[[package]]
name = "unicase"
@ -1982,9 +1979,9 @@ checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519"
[[package]]
name = "wasm-bindgen"
version = "0.2.63"
version = "0.2.65"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4c2dc4aa152834bc334f506c1a06b866416a8b6697d5c9f75b9a689c8486def0"
checksum = "f3edbcc9536ab7eababcc6d2374a0b7bfe13a2b6d562c5e07f370456b1a8f33d"
dependencies = [
"cfg-if",
"serde",
@ -1994,24 +1991,24 @@ dependencies = [
[[package]]
name = "wasm-bindgen-backend"
version = "0.2.63"
version = "0.2.65"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ded84f06e0ed21499f6184df0e0cb3494727b0c5da89534e0fcc55c51d812101"
checksum = "89ed2fb8c84bfad20ea66b26a3743f3e7ba8735a69fe7d95118c33ec8fc1244d"
dependencies = [
"bumpalo",
"lazy_static",
"log",
"proc-macro2 1.0.18",
"quote 1.0.7",
"syn 1.0.33",
"syn 1.0.34",
"wasm-bindgen-shared",
]
[[package]]
name = "wasm-bindgen-futures"
version = "0.4.13"
version = "0.4.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "64487204d863f109eb77e8462189d111f27cb5712cc9fdb3461297a76963a2f6"
checksum = "41ad6e4e8b2b7f8c90b6e09a9b590ea15cb0d1dbe28502b5a405cd95d1981671"
dependencies = [
"cfg-if",
"js-sys",
@ -2021,9 +2018,9 @@ dependencies = [
[[package]]
name = "wasm-bindgen-macro"
version = "0.2.63"
version = "0.2.65"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "838e423688dac18d73e31edce74ddfac468e37b1506ad163ffaf0a46f703ffe3"
checksum = "eb071268b031a64d92fc6cf691715ca5a40950694d8f683c5bb43db7c730929e"
dependencies = [
"quote 1.0.7",
"wasm-bindgen-macro-support",
@ -2031,28 +2028,28 @@ dependencies = [
[[package]]
name = "wasm-bindgen-macro-support"
version = "0.2.63"
version = "0.2.65"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3156052d8ec77142051a533cdd686cba889537b213f948cd1d20869926e68e92"
checksum = "cf592c807080719d1ff2f245a687cbadb3ed28b2077ed7084b47aba8b691f2c6"
dependencies = [
"proc-macro2 1.0.18",
"quote 1.0.7",
"syn 1.0.33",
"syn 1.0.34",
"wasm-bindgen-backend",
"wasm-bindgen-shared",
]
[[package]]
name = "wasm-bindgen-shared"
version = "0.2.63"
version = "0.2.65"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c9ba19973a58daf4db6f352eda73dc0e289493cd29fb2632eb172085b6521acd"
checksum = "72b6c0220ded549d63860c78c38f3bcc558d1ca3f4efa74942c536ddbbb55e87"
[[package]]
name = "web-sys"
version = "0.3.40"
version = "0.3.42"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7b72fe77fd39e4bd3eaa4412fd299a0be6b3dfe9d2597e2f1c20beb968f41d17"
checksum = "8be2398f326b7ba09815d0b403095f34dd708579220d099caae89be0b32137b2"
dependencies = [
"js-sys",
"wasm-bindgen",

View file

@ -29,6 +29,6 @@ thiserror = "1.0.19"
image = { version = "0.23.4", default-features = false, features = ["jpeg", "png", "gif"] }
[dependencies.ruma]
git = "https://github.com/DevinR528/ruma"
branch = "key-sign"
features = ["rand", "client-api", "federation-api"]
git = "https://github.com/ruma/ruma"
features = ["rand", "client-api", "federation-api", "unstable-pre-spec", "unstable-synapse-quirks"]
rev = "848b225"

View file

@ -220,7 +220,7 @@ pub fn register_route(
Ok(register::Response {
access_token: Some(token),
user_id,
device_id: Some(device_id),
device_id: Some(device_id.into_boxed_str()),
}
.into())
}
@ -268,7 +268,7 @@ pub fn login_route(
.body
.device_id
.clone()
.unwrap_or_else(|| utils::random_string(DEVICE_ID_LENGTH));
.unwrap_or_else(|| utils::random_string(DEVICE_ID_LENGTH).into_boxed_str());
// Generate a new token for the device
let token = utils::random_string(TOKEN_LENGTH);
@ -285,7 +285,7 @@ pub fn login_route(
user_id,
access_token: token,
home_server: Some(db.globals.server_name().to_string()),
device_id,
device_id: device_id.to_string(),
well_known: None,
}
.into())
@ -898,7 +898,7 @@ pub fn get_keys_route(
device_display_name: metadata.display_name,
});
container.insert(device_id.to_owned(), keys);
container.insert(device_id.to_owned().into_boxed_str(), keys);
}
}
device_keys.insert(user_id.clone(), container);
@ -917,7 +917,7 @@ pub fn get_keys_route(
device_display_name: metadata.display_name,
});
container.insert(device_id.clone(), keys);
container.insert(device_id.to_string().into_boxed_str(), keys);
}
device_keys.insert(user_id.clone(), container);
}
@ -1214,21 +1214,19 @@ pub fn create_room_route(
}
})?;
let mut content = ruma::events::room::create::CreateEventContent::new(user_id.clone());
content.federate = body.creation_content.as_ref().map_or(true, |c| c.federate);
content.predecessor = body
.creation_content
.as_ref()
.and_then(|c| c.predecessor.clone());
content.room_version = RoomVersionId::version_6();
// 1. The room create event
db.rooms.append_pdu(
room_id.clone(),
user_id.clone(),
EventType::RoomCreate,
serde_json::to_value(ruma::events::room::create::CreateEventContent {
creator: user_id.clone(),
federate: body.creation_content.as_ref().map_or(true, |c| c.federate),
predecessor: body
.creation_content
.as_ref()
.and_then(|c| c.predecessor.clone()),
room_version: RoomVersionId::version_6(),
})
.expect("event is valid, we just created it"),
serde_json::to_value(content).expect("event is valid, we just created it"),
None,
Some("".to_owned()),
None,
@ -1329,9 +1327,9 @@ pub fn create_room_route(
room_id.clone(),
user_id.clone(),
EventType::RoomHistoryVisibility,
serde_json::to_value(history_visibility::HistoryVisibilityEventContent {
history_visibility: history_visibility::HistoryVisibility::Shared,
})
serde_json::to_value(history_visibility::HistoryVisibilityEventContent::new(
history_visibility::HistoryVisibility::Shared,
))
.expect("event is valid, we just created it"),
None,
Some("".to_owned()),
@ -1345,15 +1343,13 @@ pub fn create_room_route(
user_id.clone(),
EventType::RoomGuestAccess,
match preset {
create_room::RoomPreset::PublicChat => {
serde_json::to_value(guest_access::GuestAccessEventContent {
guest_access: guest_access::GuestAccess::Forbidden,
})
.expect("event is valid, we just created it")
}
_ => serde_json::to_value(guest_access::GuestAccessEventContent {
guest_access: guest_access::GuestAccess::CanJoin,
})
create_room::RoomPreset::PublicChat => serde_json::to_value(
guest_access::GuestAccessEventContent::new(guest_access::GuestAccess::Forbidden),
)
.expect("event is valid, we just created it"),
_ => serde_json::to_value(guest_access::GuestAccessEventContent::new(
guest_access::GuestAccess::CanJoin,
))
.expect("event is valid, we just created it"),
},
None,
@ -2567,11 +2563,7 @@ pub fn sync_route(
notification_count,
},
timeline: sync_events::Timeline {
limited: if limited || joined_since_last_sync {
Some(true)
} else {
None
},
limited: limited || joined_since_last_sync,
prev_batch,
events: room_events,
},
@ -2620,7 +2612,7 @@ pub fn sync_route(
{
edus.push(
serde_json::from_str(
&serde_json::to_string(&ruma::events::AnyEphemeralRoomEventStub::Typing(
&serde_json::to_string(&ruma::events::AnySyncEphemeralRoomEvent::Typing(
db.rooms.edus.roomactives_all(&room_id)?,
))
.expect("event is valid, we just created it"),
@ -2632,7 +2624,7 @@ pub fn sync_route(
let left_room = sync_events::LeftRoom {
account_data: sync_events::AccountData { events: Vec::new() },
timeline: sync_events::Timeline {
limited: Some(false),
limited: false,
prev_batch: Some(next_batch.clone()),
events: room_events,
},

View file

@ -1,14 +1,14 @@
use std::convert::TryFrom;
use std::convert::TryInto;
use crate::{utils, Error, Result};
use ruma::identifiers::{ServerName, ServerNameRef};
use ruma::identifiers::ServerName;
pub const COUNTER: &str = "c";
pub struct Globals {
pub(super) globals: sled::Tree,
keypair: ruma::signatures::Ed25519KeyPair,
reqwest_client: reqwest::Client,
server_name: ServerName,
server_name: Box<ServerName>,
registration_disabled: bool,
}
@ -26,13 +26,12 @@ impl Globals {
globals,
keypair,
reqwest_client: reqwest::Client::new(),
server_name: ServerName::try_from(
config
.get_str("server_name")
.unwrap_or("localhost")
.to_owned(),
)
.map_err(|_| Error::BadConfig("Invalid server name"))?,
server_name: config
.get_str("server_name")
.unwrap_or("localhost")
.to_string()
.try_into()
.map_err(|_| crate::Error::bad_database("Private or public keys are invalid."))?,
registration_disabled: config.get_bool("registration_disabled").unwrap_or(false),
})
}
@ -64,7 +63,7 @@ impl Globals {
})
}
pub fn server_name(&self) -> ServerNameRef<'_> {
pub fn server_name(&self) -> &ServerName {
self.server_name.as_ref()
}

View file

@ -2,7 +2,7 @@ use crate::{utils, Error, Result};
use ruma::{
api::client::{
error::ErrorKind,
r0::backup::{get_backup_keys::Sessions, BackupAlgorithm, KeyData},
r0::backup::{BackupAlgorithm, KeyData, Sessions},
},
identifiers::{RoomId, UserId},
};

View file

@ -61,7 +61,7 @@ impl RoomEdus {
&self,
room_id: &RoomId,
since: u64,
) -> Result<impl Iterator<Item = Result<EventJson<ruma::events::AnyEphemeralRoomEventStub>>>>
) -> Result<impl Iterator<Item = Result<EventJson<ruma::events::AnySyncEphemeralRoomEvent>>>>
{
let mut prefix = room_id.to_string().as_bytes().to_vec();
prefix.push(0xff);

View file

@ -9,7 +9,7 @@ use ruma::{
},
},
events::{AnyToDeviceEvent, EventJson, EventType},
identifiers::UserId,
identifiers::{DeviceId, UserId},
};
use std::{collections::BTreeMap, convert::TryFrom, time::SystemTime};
@ -168,7 +168,7 @@ impl Users {
pub fn create_device(
&self,
user_id: &UserId,
device_id: &str,
device_id: &DeviceId,
token: &str,
initial_device_display_name: Option<String>,
) -> Result<()> {
@ -182,7 +182,7 @@ impl Users {
self.userdeviceid_metadata.insert(
userdeviceid,
serde_json::to_string(&Device {
device_id: device_id.to_owned(),
device_id: device_id.to_string().into_boxed_str(),
display_name: initial_device_display_name,
last_seen_ip: None, // TODO
last_seen_ts: Some(SystemTime::now()),

View file

@ -2,8 +2,8 @@ use crate::{Error, Result};
use js_int::UInt;
use ruma::{
events::{
pdu::EventHash, room::member::MemberEventContent, AnyRoomEvent, AnyRoomEventStub,
AnyStateEvent, AnyStateEventStub, AnyStrippedStateEventStub, EventJson, EventType,
pdu::EventHash, room::member::MemberEventContent, AnyRoomEvent, AnyStateEvent,
AnyStrippedStateEvent, AnySyncRoomEvent, AnySyncStateEvent, EventJson, EventType,
StateEvent,
},
identifiers::{EventId, RoomId, UserId},
@ -79,9 +79,9 @@ impl PduEvent {
Ok(())
}
pub fn to_room_event_stub(&self) -> EventJson<AnyRoomEventStub> {
pub fn to_room_event_stub(&self) -> EventJson<AnySyncRoomEvent> {
let json = serde_json::to_string(&self).expect("PDUs are always valid");
serde_json::from_str::<EventJson<AnyRoomEventStub>>(&json)
serde_json::from_str::<EventJson<AnySyncRoomEvent>>(&json)
.expect("EventJson::from_str always works")
}
pub fn to_room_event(&self) -> EventJson<AnyRoomEvent> {
@ -94,14 +94,14 @@ impl PduEvent {
serde_json::from_str::<EventJson<AnyStateEvent>>(&json)
.expect("EventJson::from_str always works")
}
pub fn to_state_event_stub(&self) -> EventJson<AnyStateEventStub> {
pub fn to_state_event_stub(&self) -> EventJson<AnySyncStateEvent> {
let json = serde_json::to_string(&self).expect("PDUs are always valid");
serde_json::from_str::<EventJson<AnyStateEventStub>>(&json)
serde_json::from_str::<EventJson<AnySyncStateEvent>>(&json)
.expect("EventJson::from_str always works")
}
pub fn to_stripped_state_event(&self) -> EventJson<AnyStrippedStateEventStub> {
pub fn to_stripped_state_event(&self) -> EventJson<AnyStrippedStateEvent> {
let json = serde_json::to_string(&self).expect("PDUs are always valid");
serde_json::from_str::<EventJson<AnyStrippedStateEventStub>>(&json)
serde_json::from_str::<EventJson<AnyStrippedStateEvent>>(&json)
.expect("EventJson::from_str always works")
}
pub fn to_member_event(&self) -> EventJson<StateEvent<MemberEventContent>> {