Merge branch 'master' of https://git.koesters.xyz/timo/conduit into ruma-mono

next
Devin Ragotzy 2020-07-25 13:46:28 -04:00
commit 61458536ab
7 changed files with 129 additions and 153 deletions

244
Cargo.lock generated
View File

@ -106,9 +106,9 @@ version = "0.1.36"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a265e3abeffdce30b2e26b7a11b222fe37c6067404001b434101457d0385eb92" checksum = "a265e3abeffdce30b2e26b7a11b222fe37c6067404001b434101457d0385eb92"
dependencies = [ dependencies = [
"proc-macro2 1.0.19", "proc-macro2",
"quote 1.0.7", "quote",
"syn 1.0.35", "syn",
] ]
[[package]] [[package]]
@ -154,15 +154,6 @@ version = "0.2.6"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1b20b618342cf9891c292c4f5ac2cde7287cc5c87e87e9c769d617793607dec1" checksum = "1b20b618342cf9891c292c4f5ac2cde7287cc5c87e87e9c769d617793607dec1"
[[package]]
name = "base64"
version = "0.10.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0b25d992356d2eb0ed82172f5248873db5560c4721f564b13cb5193bda5e668e"
dependencies = [
"byteorder",
]
[[package]] [[package]]
name = "base64" name = "base64"
version = "0.11.0" version = "0.11.0"
@ -322,7 +313,7 @@ dependencies = [
"aes-gcm", "aes-gcm",
"base64 0.12.3", "base64 0.12.3",
"hkdf", "hkdf",
"percent-encoding 2.1.0", "percent-encoding",
"rand", "rand",
"sha2", "sha2",
"time 0.2.16", "time 0.2.16",
@ -402,7 +393,7 @@ dependencies = [
[[package]] [[package]]
name = "devise" name = "devise"
version = "0.3.0" version = "0.3.0"
source = "git+https://github.com/SergioBenitez/Devise.git?rev=e58b3ac9a#e58b3ac9afc3b6ff10a8aaf02a3e768a8f530089" source = "git+https://github.com/SergioBenitez/Devise.git?rev=1e42a2691#1e42a2691ef9934a446b8ed0ca1c4c8cf283f8bf"
dependencies = [ dependencies = [
"devise_codegen", "devise_codegen",
"devise_core", "devise_core",
@ -411,21 +402,22 @@ dependencies = [
[[package]] [[package]]
name = "devise_codegen" name = "devise_codegen"
version = "0.3.0" version = "0.3.0"
source = "git+https://github.com/SergioBenitez/Devise.git?rev=e58b3ac9a#e58b3ac9afc3b6ff10a8aaf02a3e768a8f530089" source = "git+https://github.com/SergioBenitez/Devise.git?rev=1e42a2691#1e42a2691ef9934a446b8ed0ca1c4c8cf283f8bf"
dependencies = [ dependencies = [
"devise_core", "devise_core",
"quote 1.0.7", "quote",
] ]
[[package]] [[package]]
name = "devise_core" name = "devise_core"
version = "0.3.0" version = "0.3.0"
source = "git+https://github.com/SergioBenitez/Devise.git?rev=e58b3ac9a#e58b3ac9afc3b6ff10a8aaf02a3e768a8f530089" source = "git+https://github.com/SergioBenitez/Devise.git?rev=1e42a2691#1e42a2691ef9934a446b8ed0ca1c4c8cf283f8bf"
dependencies = [ dependencies = [
"bitflags", "bitflags",
"proc-macro2 1.0.19", "proc-macro2",
"quote 1.0.7", "proc-macro2-diagnostics",
"syn 1.0.35", "quote",
"syn",
] ]
[[package]] [[package]]
@ -597,9 +589,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d0b5a30a4328ab5473878237c447333c093297bded83a4983d10f4deea240d39" checksum = "d0b5a30a4328ab5473878237c447333c093297bded83a4983d10f4deea240d39"
dependencies = [ dependencies = [
"proc-macro-hack", "proc-macro-hack",
"proc-macro2 1.0.19", "proc-macro2",
"quote 1.0.7", "quote",
"syn 1.0.35", "syn",
] ]
[[package]] [[package]]
@ -865,10 +857,10 @@ dependencies = [
] ]
[[package]] [[package]]
name = "instant" name = "inlinable_string"
version = "0.1.6" version = "0.1.11"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5b141fdc7836c525d4d594027d318c84161ca17aaf8113ab1f81ab93ae897485" checksum = "cb6ee2a7da03bfc3b66ca47c92c2e392fcc053ea040a85561749b026f7aad09a"
[[package]] [[package]]
name = "iovec" name = "iovec"
@ -1220,31 +1212,24 @@ dependencies = [
[[package]] [[package]]
name = "pear" name = "pear"
version = "0.1.4" version = "0.2.0-dev"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "git+https://github.com/SergioBenitez/Pear.git?rev=4b68055#4b680556063568a42fcd4328335cdfdf7608be49"
checksum = "5320f212db967792b67cfe12bd469d08afd6318a249bd917d5c19bc92200ab8a"
dependencies = [ dependencies = [
"inlinable_string",
"pear_codegen", "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", "yansi",
] ]
[[package]] [[package]]
name = "percent-encoding" name = "pear_codegen"
version = "1.0.1" version = "0.2.0-dev"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "git+https://github.com/SergioBenitez/Pear.git?rev=4b68055#4b680556063568a42fcd4328335cdfdf7608be49"
checksum = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" dependencies = [
"proc-macro2",
"proc-macro2-diagnostics",
"quote",
"syn",
]
[[package]] [[package]]
name = "percent-encoding" name = "percent-encoding"
@ -1267,9 +1252,9 @@ version = "0.4.22"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6a0ffd45cf79d88737d7cc85bfd5d2894bee1139b356e616fe85dc389c61aaf7" checksum = "6a0ffd45cf79d88737d7cc85bfd5d2894bee1139b356e616fe85dc389c61aaf7"
dependencies = [ dependencies = [
"proc-macro2 1.0.19", "proc-macro2",
"quote 1.0.7", "quote",
"syn 1.0.35", "syn",
] ]
[[package]] [[package]]
@ -1332,29 +1317,23 @@ checksum = "eba180dafb9038b050a4c280019bbedf9f2467b61e5d892dcad585bb57aadc5a"
[[package]] [[package]]
name = "proc-macro2" name = "proc-macro2"
version = "0.4.30" version = "1.0.18"
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.19"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "04f5f085b5d71e2188cb8271e5da0161ad52c3f227a661a3c135fdf28e258b12" checksum = "04f5f085b5d71e2188cb8271e5da0161ad52c3f227a661a3c135fdf28e258b12"
dependencies = [ dependencies = [
"unicode-xid 0.2.1", "unicode-xid",
] ]
[[package]] [[package]]
name = "quote" name = "proc-macro2-diagnostics"
version = "0.6.13" version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "git+https://github.com/SergioBenitez/proc-macro2-diagnostics.git?rev=13fbb43#13fbb43db72034b6f9660a9b00e338cebd8dcf44"
checksum = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1"
dependencies = [ dependencies = [
"proc-macro2 0.4.30", "proc-macro2",
"quote",
"syn",
"version_check",
"yansi",
] ]
[[package]] [[package]]
@ -1363,7 +1342,7 @@ version = "1.0.7"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "aa563d17ecb180e500da1cfd2b028310ac758de548efdd203e18f283af693f37" checksum = "aa563d17ecb180e500da1cfd2b028310ac758de548efdd203e18f283af693f37"
dependencies = [ dependencies = [
"proc-macro2 1.0.19", "proc-macro2",
] ]
[[package]] [[package]]
@ -1439,9 +1418,9 @@ version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7d21b475ab879ef0e315ad99067fa25778c3b0377f57f1b00207448dac1a3144" checksum = "7d21b475ab879ef0e315ad99067fa25778c3b0377f57f1b00207448dac1a3144"
dependencies = [ dependencies = [
"proc-macro2 1.0.19", "proc-macro2",
"quote 1.0.7", "quote",
"syn 1.0.35", "syn",
] ]
[[package]] [[package]]
@ -1474,7 +1453,7 @@ dependencies = [
"mime", "mime",
"mime_guess", "mime_guess",
"native-tls", "native-tls",
"percent-encoding 2.1.0", "percent-encoding",
"pin-project-lite", "pin-project-lite",
"serde", "serde",
"serde_urlencoded", "serde_urlencoded",
@ -1505,7 +1484,7 @@ dependencies = [
[[package]] [[package]]
name = "rocket" name = "rocket"
version = "0.5.0-dev" version = "0.5.0-dev"
source = "git+https://github.com/SergioBenitez/Rocket.git?rev=33e95f49008dcbc8dc51da7d37e0570059176b73#33e95f49008dcbc8dc51da7d37e0570059176b73" source = "git+https://github.com/SergioBenitez/Rocket.git?rev=8d779caa22c63b15a6c3ceb75d8f6d4971b2eb67#8d779caa22c63b15a6c3ceb75d8f6d4971b2eb67"
dependencies = [ dependencies = [
"async-trait", "async-trait",
"atomic", "atomic",
@ -1530,21 +1509,19 @@ dependencies = [
[[package]] [[package]]
name = "rocket_codegen" name = "rocket_codegen"
version = "0.5.0-dev" version = "0.5.0-dev"
source = "git+https://github.com/SergioBenitez/Rocket.git?rev=33e95f49008dcbc8dc51da7d37e0570059176b73#33e95f49008dcbc8dc51da7d37e0570059176b73" source = "git+https://github.com/SergioBenitez/Rocket.git?rev=8d779caa22c63b15a6c3ceb75d8f6d4971b2eb67#8d779caa22c63b15a6c3ceb75d8f6d4971b2eb67"
dependencies = [ dependencies = [
"devise", "devise",
"glob", "glob",
"indexmap", "indexmap",
"quote 1.0.7", "quote",
"rocket_http", "rocket_http",
"version_check",
"yansi",
] ]
[[package]] [[package]]
name = "rocket_http" name = "rocket_http"
version = "0.5.0-dev" version = "0.5.0-dev"
source = "git+https://github.com/SergioBenitez/Rocket.git?rev=33e95f49008dcbc8dc51da7d37e0570059176b73#33e95f49008dcbc8dc51da7d37e0570059176b73" source = "git+https://github.com/SergioBenitez/Rocket.git?rev=8d779caa22c63b15a6c3ceb75d8f6d4971b2eb67#8d779caa22c63b15a6c3ceb75d8f6d4971b2eb67"
dependencies = [ dependencies = [
"cookie", "cookie",
"http", "http",
@ -1553,14 +1530,14 @@ dependencies = [
"log", "log",
"mime", "mime",
"pear", "pear",
"percent-encoding 1.0.1", "percent-encoding",
"ref-cast", "ref-cast",
"smallvec", "smallvec",
"state", "state",
"time 0.2.16", "time 0.2.16",
"tokio", "tokio",
"tokio-rustls", "tokio-rustls",
"unicode-xid 0.2.1", "unicode-xid",
] ]
[[package]] [[package]]
@ -1583,7 +1560,7 @@ version = "0.16.1"
source = "git+https://github.com/ruma/ruma?rev=b55f827#b55f82742c88ea6d8744f37bacac5cbfa17a9029" source = "git+https://github.com/ruma/ruma?rev=b55f827#b55f82742c88ea6d8744f37bacac5cbfa17a9029"
dependencies = [ dependencies = [
"http", "http",
"percent-encoding 2.1.0", "percent-encoding",
"ruma-api-macros", "ruma-api-macros",
"ruma-identifiers", "ruma-identifiers",
"ruma-serde", "ruma-serde",
@ -1597,10 +1574,9 @@ name = "ruma-api-macros"
version = "0.16.1" version = "0.16.1"
source = "git+https://github.com/ruma/ruma?rev=b55f827#b55f82742c88ea6d8744f37bacac5cbfa17a9029" source = "git+https://github.com/ruma/ruma?rev=b55f827#b55f82742c88ea6d8744f37bacac5cbfa17a9029"
dependencies = [ dependencies = [
"matches", "proc-macro2",
"proc-macro2 1.0.19", "quote",
"quote 1.0.7", "syn",
"syn 1.0.35",
] ]
[[package]] [[package]]
@ -1653,10 +1629,9 @@ name = "ruma-events-macros"
version = "0.21.3" version = "0.21.3"
source = "git+https://github.com/ruma/ruma?rev=b55f827#b55f82742c88ea6d8744f37bacac5cbfa17a9029" source = "git+https://github.com/ruma/ruma?rev=b55f827#b55f82742c88ea6d8744f37bacac5cbfa17a9029"
dependencies = [ dependencies = [
"matches", "proc-macro2",
"proc-macro2 1.0.19", "quote",
"quote 1.0.7", "syn",
"syn 1.0.35",
] ]
[[package]] [[package]]
@ -1750,11 +1725,11 @@ dependencies = [
[[package]] [[package]]
name = "rustls" name = "rustls"
version = "0.16.0" version = "0.18.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b25a18b1bf7387f0145e7f8324e700805aade3842dd3db2e74e4cdeb4677c09e" checksum = "cac94b333ee2aac3284c5b8a1b7fb4dd11cba88c244e3fe33cdbd047af0eb693"
dependencies = [ dependencies = [
"base64 0.10.1", "base64 0.12.3",
"log", "log",
"ring", "ring",
"sct", "sct",
@ -1846,9 +1821,9 @@ version = "1.0.114"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2a0be94b04690fbaed37cddffc5c134bf537c8e3329d53e982fe04c374978f8e" checksum = "2a0be94b04690fbaed37cddffc5c134bf537c8e3329d53e982fe04c374978f8e"
dependencies = [ dependencies = [
"proc-macro2 1.0.19", "proc-macro2",
"quote 1.0.7", "quote",
"syn 1.0.35", "syn",
] ]
[[package]] [[package]]
@ -1985,11 +1960,11 @@ version = "0.5.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c87a60a40fccc84bef0652345bbbbbe20a605bf5d0ce81719fc476f5c03b50ef" checksum = "c87a60a40fccc84bef0652345bbbbbe20a605bf5d0ce81719fc476f5c03b50ef"
dependencies = [ dependencies = [
"proc-macro2 1.0.19", "proc-macro2",
"quote 1.0.7", "quote",
"serde", "serde",
"serde_derive", "serde_derive",
"syn 1.0.35", "syn",
] ]
[[package]] [[package]]
@ -1999,13 +1974,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "58fa5ff6ad0d98d1ffa8cb115892b6e69d67799f6763e162a1c9db421dc22e11" checksum = "58fa5ff6ad0d98d1ffa8cb115892b6e69d67799f6763e162a1c9db421dc22e11"
dependencies = [ dependencies = [
"base-x", "base-x",
"proc-macro2 1.0.19", "proc-macro2",
"quote 1.0.7", "quote",
"serde", "serde",
"serde_derive", "serde_derive",
"serde_json", "serde_json",
"sha1", "sha1",
"syn 1.0.35", "syn",
] ]
[[package]] [[package]]
@ -2030,9 +2005,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "87c85aa3f8ea653bfd3ddf25f7ee357ee4d204731f6aa9ad04002306f6e2774c" checksum = "87c85aa3f8ea653bfd3ddf25f7ee357ee4d204731f6aa9ad04002306f6e2774c"
dependencies = [ dependencies = [
"heck", "heck",
"proc-macro2 1.0.19", "proc-macro2",
"quote 1.0.7", "quote",
"syn 1.0.35", "syn",
] ]
[[package]] [[package]]
@ -2049,24 +2024,13 @@ checksum = "502d53007c02d7605a05df1c1a73ee436952781653da5d0bf57ad608f66932c1"
[[package]] [[package]]
name = "syn" name = "syn"
version = "0.15.44" version = "1.0.33"
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.35"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fb7f4c519df8c117855e19dd8cc851e89eb746fe7a73f0157e0d95fdec5369b0" checksum = "fb7f4c519df8c117855e19dd8cc851e89eb746fe7a73f0157e0d95fdec5369b0"
dependencies = [ dependencies = [
"proc-macro2 1.0.19", "proc-macro2",
"quote 1.0.7", "quote",
"unicode-xid 0.2.1", "unicode-xid",
] ]
[[package]] [[package]]
@ -2098,9 +2062,9 @@ version = "1.0.20"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bd80fc12f73063ac132ac92aceea36734f04a1d93c1240c6944e23a3b8841793" checksum = "bd80fc12f73063ac132ac92aceea36734f04a1d93c1240c6944e23a3b8841793"
dependencies = [ dependencies = [
"proc-macro2 1.0.19", "proc-macro2",
"quote 1.0.7", "quote",
"syn 1.0.35", "syn",
] ]
[[package]] [[package]]
@ -2145,10 +2109,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e5c3be1edfad6027c69f5491cf4cb310d1a71ecd6af742788c6ff8bced86b8fa" checksum = "e5c3be1edfad6027c69f5491cf4cb310d1a71ecd6af742788c6ff8bced86b8fa"
dependencies = [ dependencies = [
"proc-macro-hack", "proc-macro-hack",
"proc-macro2 1.0.19", "proc-macro2",
"quote 1.0.7", "quote",
"standback", "standback",
"syn 1.0.35", "syn",
] ]
[[package]] [[package]]
@ -2186,16 +2150,16 @@ version = "0.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f0c3acc6aa564495a0f2e1d59fab677cd7f81a19994cfc7f3ad0e64301560389" checksum = "f0c3acc6aa564495a0f2e1d59fab677cd7f81a19994cfc7f3ad0e64301560389"
dependencies = [ dependencies = [
"proc-macro2 1.0.19", "proc-macro2",
"quote 1.0.7", "quote",
"syn 1.0.35", "syn",
] ]
[[package]] [[package]]
name = "tokio-rustls" name = "tokio-rustls"
version = "0.12.3" version = "0.14.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3068d891551949b37681724d6b73666787cc63fa8e255c812a41d2513aff9775" checksum = "228139ddd4fea3fa345a29233009635235833e52807af7ea6448ead03890d6a9"
dependencies = [ dependencies = [
"futures-core", "futures-core",
"rustls", "rustls",
@ -2229,9 +2193,9 @@ dependencies = [
[[package]] [[package]]
name = "toml" name = "toml"
version = "0.4.10" version = "0.5.6"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "758664fc71a3a69038656bee8b6be6477d2a6c315a6b81f7081f591bffa4111f" checksum = "ffc92d160b1eef40665be3a05630d003936a3bc7da7421277846c2613e92c71a"
dependencies = [ dependencies = [
"serde", "serde",
] ]
@ -2307,12 +2271,6 @@ version = "1.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e83e153d1053cbb5a118eeff7fd5be06ed99153f00dbcd8ae310c5fb2b22edc0" checksum = "e83e153d1053cbb5a118eeff7fd5be06ed99153f00dbcd8ae310c5fb2b22edc0"
[[package]]
name = "unicode-xid"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc"
[[package]] [[package]]
name = "unicode-xid" name = "unicode-xid"
version = "0.2.1" version = "0.2.1"
@ -2343,7 +2301,7 @@ checksum = "829d4a8476c35c9bf0bbce5a3b23f4106f79728039b726d292bb93bc106787cb"
dependencies = [ dependencies = [
"idna", "idna",
"matches", "matches",
"percent-encoding 2.1.0", "percent-encoding",
] ]
[[package]] [[package]]
@ -2395,9 +2353,9 @@ dependencies = [
"bumpalo", "bumpalo",
"lazy_static", "lazy_static",
"log", "log",
"proc-macro2 1.0.19", "proc-macro2",
"quote 1.0.7", "quote",
"syn 1.0.35", "syn",
"wasm-bindgen-shared", "wasm-bindgen-shared",
] ]
@ -2419,7 +2377,7 @@ version = "0.2.65"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "eb071268b031a64d92fc6cf691715ca5a40950694d8f683c5bb43db7c730929e" checksum = "eb071268b031a64d92fc6cf691715ca5a40950694d8f683c5bb43db7c730929e"
dependencies = [ dependencies = [
"quote 1.0.7", "quote",
"wasm-bindgen-macro-support", "wasm-bindgen-macro-support",
] ]
@ -2429,9 +2387,9 @@ version = "0.2.65"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cf592c807080719d1ff2f245a687cbadb3ed28b2077ed7084b47aba8b691f2c6" checksum = "cf592c807080719d1ff2f245a687cbadb3ed28b2077ed7084b47aba8b691f2c6"
dependencies = [ dependencies = [
"proc-macro2 1.0.19", "proc-macro2",
"quote 1.0.7", "quote",
"syn 1.0.35", "syn",
"wasm-bindgen-backend", "wasm-bindgen-backend",
"wasm-bindgen-shared", "wasm-bindgen-shared",
] ]

View File

@ -12,7 +12,7 @@ edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies] [dependencies]
rocket = { git = "https://github.com/SergioBenitez/Rocket.git", rev = "33e95f49008dcbc8dc51da7d37e0570059176b73", features = ["tls"] } rocket = { git = "https://github.com/SergioBenitez/Rocket.git", rev = "8d779caa22c63b15a6c3ceb75d8f6d4971b2eb67", features = ["tls"] }
http = "0.2.1" http = "0.2.1"
log = "0.4.8" log = "0.4.8"
sled = "0.32.0" sled = "0.32.0"

View File

@ -1 +1 @@
nightly-2020-07-12 1.45.0

View File

@ -34,7 +34,7 @@ use ruma::{
media::{create_content, get_content, get_content_thumbnail, get_media_config}, media::{create_content, get_content, get_content_thumbnail, get_media_config},
membership::{ membership::{
ban_user, forget_room, get_member_events, invite_user, join_room_by_id, ban_user, forget_room, get_member_events, invite_user, join_room_by_id,
join_room_by_id_or_alias, kick_user, leave_room, unban_user, join_room_by_id_or_alias, joined_rooms, kick_user, leave_room, unban_user,
}, },
message::{create_message_event, get_message_events}, message::{create_message_event, get_message_events},
presence::set_presence, presence::set_presence,
@ -1439,6 +1439,23 @@ pub fn create_room_route(
Ok(create_room::Response { room_id }.into()) Ok(create_room::Response { room_id }.into())
} }
#[get("/_matrix/client/r0/joined_rooms", data = "<body>")]
pub fn joined_rooms_route(
db: State<'_, Database>,
body: Ruma<joined_rooms::Request>,
) -> ConduitResult<joined_rooms::Response> {
let user_id = body.user_id.as_ref().expect("user is authenticated");
Ok(joined_rooms::Response {
joined_rooms: db
.rooms
.rooms_joined(&user_id)
.filter_map(|r| r.ok())
.collect(),
}
.into())
}
#[put( #[put(
"/_matrix/client/r0/rooms/<_room_id>/redact/<_event_id>/<_txn_id>", "/_matrix/client/r0/rooms/<_room_id>/redact/<_event_id>/<_txn_id>",
data = "<body>" data = "<body>"
@ -1872,10 +1889,10 @@ pub async fn get_public_rooms_route(
.into()) .into())
} }
#[post("/_matrix/client/r0/publicRooms", data = "<body>")] #[post("/_matrix/client/r0/publicRooms", data = "<_body>")]
pub async fn get_public_rooms_filtered_route( pub async fn get_public_rooms_filtered_route(
db: State<'_, Database>, db: State<'_, Database>,
body: Ruma<get_public_rooms_filtered::Request>, _body: Ruma<get_public_rooms_filtered::Request>,
) -> ConduitResult<get_public_rooms_filtered::Response> { ) -> ConduitResult<get_public_rooms_filtered::Response> {
let mut chunk = db let mut chunk = db
.rooms .rooms

View File

@ -1,4 +1,3 @@
#![feature(proc_macro_hygiene, decl_macro)]
#![warn(rust_2018_idioms)] #![warn(rust_2018_idioms)]
pub mod push_rules; pub mod push_rules;
@ -67,6 +66,7 @@ fn setup_rocket() -> rocket::Rocket {
client_server::join_room_by_id_or_alias_route, client_server::join_room_by_id_or_alias_route,
client_server::leave_room_route, client_server::leave_room_route,
client_server::forget_room_route, client_server::forget_room_route,
client_server::joined_rooms_route,
client_server::kick_user_route, client_server::kick_user_route,
client_server::ban_user_route, client_server::ban_user_route,
client_server::unban_user_route, client_server::unban_user_route,

View File

@ -1,7 +1,7 @@
use crate::{utils, Error}; use crate::{utils, Error};
use log::warn; use log::warn;
use rocket::{ use rocket::{
data::{Data, FromDataFuture, Transform, TransformFuture, Transformed, FromTransformedData}, data::{Data, FromDataFuture, FromTransformedData, Transform, TransformFuture, Transformed},
http::Status, http::Status,
response::{self, Responder}, response::{self, Responder},
Outcome::*, Outcome::*,
@ -125,7 +125,7 @@ impl<'r, 'o, T> Responder<'r, 'o> for RumaResponse<T>
where where
T: Send + TryInto<http::Response<Vec<u8>>>, T: Send + TryInto<http::Response<Vec<u8>>>,
T::Error: Send, T::Error: Send,
'o: 'r 'o: 'r,
{ {
fn respond_to(self, _: &'r Request<'_>) -> response::Result<'o> { fn respond_to(self, _: &'r Request<'_>) -> response::Result<'o> {
let http_response: Result<http::Response<_>, _> = self.0.try_into(); let http_response: Result<http::Response<_>, _> = self.0.try_into();
@ -143,8 +143,7 @@ where
let http_body = http_response.into_body(); let http_body = http_response.into_body();
response response.sized_body(http_body.len(), Cursor::new(http_body));
.sized_body(http_body.len(), Cursor::new(http_body));
response.raw_header("Access-Control-Allow-Origin", "*"); response.raw_header("Access-Control-Allow-Origin", "*");
response.raw_header( response.raw_header(

View File

@ -29,6 +29,8 @@ GET /publicRooms lists newly-created room
GET /register yields a set of flows GET /register yields a set of flows
GET /rooms/:room_id/state fetches entire room state GET /rooms/:room_id/state fetches entire room state
GET /rooms/:room_id/state/m.room.member/:user_id fetches my membership GET /rooms/:room_id/state/m.room.member/:user_id fetches my membership
GET /joined_rooms lists newly-created room
/joined_rooms returns only joined rooms
Getting push rules doesn't corrupt the cache SYN-390 Getting push rules doesn't corrupt the cache SYN-390
POST /createRoom makes a private room POST /createRoom makes a private room
POST /createRoom makes a private room with invites POST /createRoom makes a private room with invites