Update to latest matrix SDK and other dependencies.
continuous-integration/drone/push Build is passing Details

This commit is contained in:
projectmoon 2021-03-15 20:10:42 +00:00
parent 67291e6deb
commit 8e4eb574d2
8 changed files with 248 additions and 287 deletions

367
Cargo.lock generated
View File

@ -95,9 +95,9 @@ checksum = "5f093eed78becd229346bf859eec0aa4dd7ddde0757287b2b4107a1f09c80002"
[[package]] [[package]]
name = "async-trait" name = "async-trait"
version = "0.1.42" version = "0.1.48"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8d3a45e77e34375a7923b1e8febb049bb011f064714a8e17a1a616fef01da13d" checksum = "36ea56748e10732c49404c153638a15ec3d6211ec5ff35d9bb20e13b93576adf"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
@ -139,7 +139,7 @@ dependencies = [
"futures-core", "futures-core",
"getrandom 0.2.2", "getrandom 0.2.2",
"instant", "instant",
"pin-project 1.0.5", "pin-project",
"rand 0.8.3", "rand 0.8.3",
"tokio", "tokio",
] ]
@ -194,15 +194,15 @@ dependencies = [
[[package]] [[package]]
name = "bumpalo" name = "bumpalo"
version = "3.6.0" version = "3.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "099e596ef14349721d9016f6b80dd3419ea1bf289ab9b44df8e4dfd3a005d5d9" checksum = "63396b8a4b9de3f4fdfb320ab6080762242f66a8ef174c49d8e19b674db4cdbe"
[[package]] [[package]]
name = "byteorder" name = "byteorder"
version = "1.4.2" version = "1.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ae44d1a3d5a19df61dd0c8beb138458ac2a53a7ac09eba97d55592540004306b" checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610"
[[package]] [[package]]
name = "bytes" name = "bytes"
@ -212,15 +212,9 @@ checksum = "b700ce4376041dcd0a327fd0097c41095743c4c8af8887265942faf1100bd040"
[[package]] [[package]]
name = "cc" name = "cc"
version = "1.0.66" version = "1.0.67"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4c0496836a84f8d0495758516b8621a622beb77c0fed418570e50764093ced48" checksum = "e3c69b077ad434294d3ce9f1f6143a2a4b89a8a2d54ef813d85003a4fd1137fd"
[[package]]
name = "cfg-if"
version = "0.1.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822"
[[package]] [[package]]
name = "cfg-if" name = "cfg-if"
@ -354,17 +348,16 @@ version = "1.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "81156fece84ab6a9f2afdb109ce3ae577e42b1228441eded99bd77f627953b1a" checksum = "81156fece84ab6a9f2afdb109ce3ae577e42b1228441eded99bd77f627953b1a"
dependencies = [ dependencies = [
"cfg-if 1.0.0", "cfg-if",
] ]
[[package]] [[package]]
name = "crossbeam-epoch" name = "crossbeam-epoch"
version = "0.9.1" version = "0.9.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a1aaa739f95311c2c7887a76863f500026092fb1dce0161dab577e559ef3569d" checksum = "2584f639eb95fea8c798496315b297cf81b9b58b6d30ab066a75455333cf4b12"
dependencies = [ dependencies = [
"cfg-if 1.0.0", "cfg-if",
"const_fn",
"crossbeam-utils", "crossbeam-utils",
"lazy_static", "lazy_static",
"memoffset", "memoffset",
@ -373,12 +366,12 @@ dependencies = [
[[package]] [[package]]
name = "crossbeam-utils" name = "crossbeam-utils"
version = "0.8.1" version = "0.8.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "02d96d1e189ef58269ebe5b97953da3274d83a93af647c2ddd6f9dab28cedb8d" checksum = "e7e9d99fa91428effe99c5c6d4634cdeba32b8cf784fc428a2a687f61a952c49"
dependencies = [ dependencies = [
"autocfg", "autocfg",
"cfg-if 1.0.0", "cfg-if",
"lazy_static", "lazy_static",
] ]
@ -407,7 +400,7 @@ version = "4.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e77a43b28d0668df09411cb0bc9a8c2adc40f9a048afe863e05fd43251e8e39c" checksum = "e77a43b28d0668df09411cb0bc9a8c2adc40f9a048afe863e05fd43251e8e39c"
dependencies = [ dependencies = [
"cfg-if 1.0.0", "cfg-if",
"num_cpus", "num_cpus",
] ]
@ -458,14 +451,14 @@ version = "0.8.28"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "80df024fbc5ac80f87dfef0d9f5209a252f2a497f7f42944cff24d8253cac065" checksum = "80df024fbc5ac80f87dfef0d9f5209a252f2a497f7f42944cff24d8253cac065"
dependencies = [ dependencies = [
"cfg-if 1.0.0", "cfg-if",
] ]
[[package]] [[package]]
name = "env_logger" name = "env_logger"
version = "0.8.2" version = "0.8.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f26ecb66b4bdca6c1409b40fb255eefc2bd4f6d135dab3c3124f80ffa2a9661e" checksum = "17392a012ea30ef05a610aa97dfb49496e71c9f676b27879922ea5bdf60d9d3f"
dependencies = [ dependencies = [
"atty", "atty",
"humantime", "humantime",
@ -497,9 +490,9 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b"
[[package]] [[package]]
name = "form_urlencoded" name = "form_urlencoded"
version = "1.0.0" version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ece68d15c92e84fa4f19d3780f1294e5ca82a78a6d515f1efaabcc144688be00" checksum = "5fc25a87fa4fd2094bffb06925852034d90a17f0d1e05197d4956d3555752191"
dependencies = [ dependencies = [
"matches", "matches",
"percent-encoding", "percent-encoding",
@ -527,9 +520,9 @@ dependencies = [
[[package]] [[package]]
name = "futures" name = "futures"
version = "0.3.12" version = "0.3.13"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "da9052a1a50244d8d5aa9bf55cbc2fb6f357c86cc52e46c62ed390a7180cf150" checksum = "7f55667319111d593ba876406af7c409c0ebb44dc4be6132a783ccf163ea14c1"
dependencies = [ dependencies = [
"futures-channel", "futures-channel",
"futures-core", "futures-core",
@ -542,9 +535,9 @@ dependencies = [
[[package]] [[package]]
name = "futures-channel" name = "futures-channel"
version = "0.3.12" version = "0.3.13"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f2d31b7ec7efab6eefc7c57233bb10b847986139d88cc2f5a02a1ae6871a1846" checksum = "8c2dd2df839b57db9ab69c2c9d8f3e8c81984781937fe2807dc6dcf3b2ad2939"
dependencies = [ dependencies = [
"futures-core", "futures-core",
"futures-sink", "futures-sink",
@ -552,15 +545,15 @@ dependencies = [
[[package]] [[package]]
name = "futures-core" name = "futures-core"
version = "0.3.12" version = "0.3.13"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "79e5145dde8da7d1b3892dad07a9c98fc04bc39892b1ecc9692cf53e2b780a65" checksum = "15496a72fabf0e62bdc3df11a59a3787429221dd0710ba8ef163d6f7a9112c94"
[[package]] [[package]]
name = "futures-executor" name = "futures-executor"
version = "0.3.12" version = "0.3.13"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e9e59fdc009a4b3096bf94f740a0f2424c082521f20a9b08c5c07c48d90fd9b9" checksum = "891a4b7b96d84d5940084b2a37632dd65deeae662c114ceaa2c879629c9c0ad1"
dependencies = [ dependencies = [
"futures-core", "futures-core",
"futures-task", "futures-task",
@ -569,9 +562,9 @@ dependencies = [
[[package]] [[package]]
name = "futures-io" name = "futures-io"
version = "0.3.12" version = "0.3.13"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "28be053525281ad8259d47e4de5de657b25e7bac113458555bb4b70bc6870500" checksum = "d71c2c65c57704c32f5241c1223167c2c3294fd34ac020c807ddbe6db287ba59"
[[package]] [[package]]
name = "futures-locks" name = "futures-locks"
@ -584,9 +577,9 @@ dependencies = [
[[package]] [[package]]
name = "futures-macro" name = "futures-macro"
version = "0.3.12" version = "0.3.13"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c287d25add322d9f9abdcdc5927ca398917996600182178774032e9f8258fedd" checksum = "ea405816a5139fb39af82c2beb921d52143f556038378d6db21183a5c37fbfb7"
dependencies = [ dependencies = [
"proc-macro-hack", "proc-macro-hack",
"proc-macro2", "proc-macro2",
@ -596,18 +589,15 @@ dependencies = [
[[package]] [[package]]
name = "futures-sink" name = "futures-sink"
version = "0.3.12" version = "0.3.13"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "caf5c69029bda2e743fddd0582d1083951d65cc9539aebf8812f36c3491342d6" checksum = "85754d98985841b7d4f5e8e6fbfa4a4ac847916893ec511a2917ccd8525b8bb3"
[[package]] [[package]]
name = "futures-task" name = "futures-task"
version = "0.3.12" version = "0.3.13"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "13de07eb8ea81ae445aca7b69f5f7bf15d7bf4912d8ca37d6645c77ae8a58d86" checksum = "fa189ef211c15ee602667a6fcfe1c1fd9e07d42250d2156382820fba33c9df80"
dependencies = [
"once_cell",
]
[[package]] [[package]]
name = "futures-timer" name = "futures-timer"
@ -621,9 +611,9 @@ dependencies = [
[[package]] [[package]]
name = "futures-util" name = "futures-util"
version = "0.3.12" version = "0.3.13"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "632a8cd0f2a4b3fdea1657f08bde063848c3bd00f9bbf6e256b8be78802e624b" checksum = "1812c7ab8aedf8d6f2701a43e1243acdbcc2b36ab26e2ad421eb99ac963d96d1"
dependencies = [ dependencies = [
"futures-channel", "futures-channel",
"futures-core", "futures-core",
@ -664,7 +654,7 @@ version = "0.1.16"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce"
dependencies = [ dependencies = [
"cfg-if 1.0.0", "cfg-if",
"libc", "libc",
"wasi 0.9.0+wasi-snapshot-preview1", "wasi 0.9.0+wasi-snapshot-preview1",
] ]
@ -675,7 +665,7 @@ version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c9495705279e7140bf035dde1f6e750c162df8b625267cd52cc44e0b156732c8" checksum = "c9495705279e7140bf035dde1f6e750c162df8b625267cd52cc44e0b156732c8"
dependencies = [ dependencies = [
"cfg-if 1.0.0", "cfg-if",
"js-sys", "js-sys",
"libc", "libc",
"wasi 0.10.2+wasi-snapshot-preview1", "wasi 0.10.2+wasi-snapshot-preview1",
@ -707,9 +697,9 @@ dependencies = [
[[package]] [[package]]
name = "h2" name = "h2"
version = "0.3.0" version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6b67e66362108efccd8ac053abafc8b7a8d86a37e6e48fc4f6f7485eb5e9e6a5" checksum = "d832b01df74254fe364568d6ddc294443f61cbec82816b60904303af87efae78"
dependencies = [ dependencies = [
"bytes", "bytes",
"fnv", "fnv",
@ -722,7 +712,6 @@ dependencies = [
"tokio", "tokio",
"tokio-util", "tokio-util",
"tracing", "tracing",
"tracing-futures",
] ]
[[package]] [[package]]
@ -830,7 +819,7 @@ dependencies = [
"httparse", "httparse",
"httpdate", "httpdate",
"itoa", "itoa",
"pin-project 1.0.5", "pin-project",
"socket2", "socket2",
"tokio", "tokio",
"tower-service", "tower-service",
@ -853,9 +842,9 @@ dependencies = [
[[package]] [[package]]
name = "idna" name = "idna"
version = "0.2.1" version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "de910d521f7cc3135c4de8db1cb910e0b5ed1dc6f57c381cd07e8e661ce10094" checksum = "89829a5d69c23d348314a7ac337fe39173b61149a9864deabd260983aed48c21"
dependencies = [ dependencies = [
"matches", "matches",
"unicode-bidi", "unicode-bidi",
@ -864,9 +853,9 @@ dependencies = [
[[package]] [[package]]
name = "indexmap" name = "indexmap"
version = "1.6.1" version = "1.6.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4fb1fa934250de4de8aef298d81c729a7d33d8c239daa3a7575e6b92bfc7313b" checksum = "824845a0bf897a9042383849b02c1bc219c2383772efcd5c6f9766fa4b81aef3"
dependencies = [ dependencies = [
"autocfg", "autocfg",
"hashbrown", "hashbrown",
@ -887,7 +876,7 @@ version = "0.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "61124eeebbd69b8190558df225adf7e4caafce0d743919e5d6b19652314ec5ec" checksum = "61124eeebbd69b8190558df225adf7e4caafce0d743919e5d6b19652314ec5ec"
dependencies = [ dependencies = [
"cfg-if 1.0.0", "cfg-if",
"js-sys", "js-sys",
"time 0.2.25", "time 0.2.25",
"wasm-bindgen", "wasm-bindgen",
@ -917,9 +906,9 @@ checksum = "dd25036021b0de88a0aff6b850051563c6516d0bf53f8638938edbb9de732736"
[[package]] [[package]]
name = "js-sys" name = "js-sys"
version = "0.3.47" version = "0.3.48"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5cfb73131c35423a367daf8cbd24100af0d077668c8c2943f0e7dd775fef0f65" checksum = "dc9f84f9b115ce7843d60706df1422a916680bfdfcbdb0447c5614ff9d7e4d78"
dependencies = [ dependencies = [
"wasm-bindgen", "wasm-bindgen",
] ]
@ -941,22 +930,22 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
[[package]] [[package]]
name = "lexical-core" name = "lexical-core"
version = "0.7.4" version = "0.7.5"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "db65c6da02e61f55dae90a0ae427b2a5f6b3e8db09f58d10efab23af92592616" checksum = "21f866863575d0e1d654fbeeabdc927292fdf862873dc3c96c6f753357e13374"
dependencies = [ dependencies = [
"arrayvec", "arrayvec",
"bitflags", "bitflags",
"cfg-if 0.1.10", "cfg-if",
"ryu", "ryu",
"static_assertions", "static_assertions",
] ]
[[package]] [[package]]
name = "libc" name = "libc"
version = "0.2.86" version = "0.2.88"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b7282d924be3275cec7f6756ff4121987bc6481325397dde6ba3e7802b1a8b1c" checksum = "03b07a082330a35e43f63177cc01689da34fbffa0105e1246cf0311472cac73a"
[[package]] [[package]]
name = "lock_api" name = "lock_api"
@ -973,7 +962,7 @@ version = "0.4.14"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710" checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710"
dependencies = [ dependencies = [
"cfg-if 1.0.0", "cfg-if",
] ]
[[package]] [[package]]
@ -1026,7 +1015,7 @@ checksum = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08"
[[package]] [[package]]
name = "matrix-sdk" name = "matrix-sdk"
version = "0.2.0" version = "0.2.0"
source = "git+https://github.com/matrix-org/matrix-rust-sdk?branch=master#e437aea01213338d7f11787411a025b6133efcff" source = "git+https://github.com/matrix-org/matrix-rust-sdk?branch=master#31dd031269ad7d91ca9f097e345a7125585efcf6"
dependencies = [ dependencies = [
"backoff", "backoff",
"dashmap", "dashmap",
@ -1049,7 +1038,7 @@ dependencies = [
[[package]] [[package]]
name = "matrix-sdk-base" name = "matrix-sdk-base"
version = "0.2.0" version = "0.2.0"
source = "git+https://github.com/matrix-org/matrix-rust-sdk?branch=master#e437aea01213338d7f11787411a025b6133efcff" source = "git+https://github.com/matrix-org/matrix-rust-sdk?branch=master#31dd031269ad7d91ca9f097e345a7125585efcf6"
dependencies = [ dependencies = [
"chacha20poly1305", "chacha20poly1305",
"dashmap", "dashmap",
@ -1072,7 +1061,7 @@ dependencies = [
[[package]] [[package]]
name = "matrix-sdk-common" name = "matrix-sdk-common"
version = "0.2.0" version = "0.2.0"
source = "git+https://github.com/matrix-org/matrix-rust-sdk?branch=master#e437aea01213338d7f11787411a025b6133efcff" source = "git+https://github.com/matrix-org/matrix-rust-sdk?branch=master#31dd031269ad7d91ca9f097e345a7125585efcf6"
dependencies = [ dependencies = [
"async-trait", "async-trait",
"futures-locks", "futures-locks",
@ -1086,7 +1075,7 @@ dependencies = [
[[package]] [[package]]
name = "matrix-sdk-crypto" name = "matrix-sdk-crypto"
version = "0.2.0" version = "0.2.0"
source = "git+https://github.com/matrix-org/matrix-rust-sdk?branch=master#e437aea01213338d7f11787411a025b6133efcff" source = "git+https://github.com/matrix-org/matrix-rust-sdk?branch=master#31dd031269ad7d91ca9f097e345a7125585efcf6"
dependencies = [ dependencies = [
"aes-ctr", "aes-ctr",
"aes-gcm", "aes-gcm",
@ -1137,9 +1126,9 @@ checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d"
[[package]] [[package]]
name = "mio" name = "mio"
version = "0.7.7" version = "0.7.9"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e50ae3f04d169fcc9bde0b547d1c205219b7157e07ded9c5aff03e0637cb3ed7" checksum = "a5dede4e2065b3842b8b0af444119f3aa331cc7cc2dd20388bfb0f5d5a38823a"
dependencies = [ dependencies = [
"libc", "libc",
"log", "log",
@ -1227,18 +1216,18 @@ dependencies = [
[[package]] [[package]]
name = "olm-sys" name = "olm-sys"
version = "1.0.2" version = "1.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0823939cee8b6f39ed0e39d8abf98919099f999ebef3eae2c67d9cd2e93ea008" checksum = "9d29b3debd2916908e725d936ef5722d014a338a57c74e59dbf4c8c43855254d"
dependencies = [ dependencies = [
"cmake", "cmake",
] ]
[[package]] [[package]]
name = "once_cell" name = "once_cell"
version = "1.5.2" version = "1.7.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "13bd41f508810a131401606d54ac32a467c97172d74ba7662562ebba5ad07fa0" checksum = "af8b08b04175473088b46763e51ee54da5f9a164bc162f615b91bc179dbf15a3"
[[package]] [[package]]
name = "opaque-debug" name = "opaque-debug"
@ -1248,15 +1237,15 @@ checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5"
[[package]] [[package]]
name = "openssl" name = "openssl"
version = "0.10.32" version = "0.10.33"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "038d43985d1ddca7a9900630d8cd031b56e4794eecc2e9ea39dd17aa04399a70" checksum = "a61075b62a23fef5a29815de7536d940aa35ce96d18ce0cc5076272db678a577"
dependencies = [ dependencies = [
"bitflags", "bitflags",
"cfg-if 1.0.0", "cfg-if",
"foreign-types", "foreign-types",
"lazy_static",
"libc", "libc",
"once_cell",
"openssl-sys", "openssl-sys",
] ]
@ -1268,9 +1257,9 @@ checksum = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de"
[[package]] [[package]]
name = "openssl-sys" name = "openssl-sys"
version = "0.9.60" version = "0.9.61"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "921fc71883267538946025deffb622905ecad223c28efbfdef9bb59a0175f3e6" checksum = "313752393519e876837e09e1fa183ddef0be7735868dced3196f4472d536277f"
dependencies = [ dependencies = [
"autocfg", "autocfg",
"cc", "cc",
@ -1292,23 +1281,23 @@ dependencies = [
[[package]] [[package]]
name = "parking_lot_core" name = "parking_lot_core"
version = "0.8.2" version = "0.8.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9ccb628cad4f84851442432c60ad8e1f607e29752d0bf072cbd0baf28aa34272" checksum = "fa7a782938e745763fe6907fc6ba86946d72f49fe7e21de074e08128a99fb018"
dependencies = [ dependencies = [
"cfg-if 1.0.0", "cfg-if",
"instant", "instant",
"libc", "libc",
"redox_syscall 0.1.57", "redox_syscall 0.2.5",
"smallvec", "smallvec",
"winapi", "winapi",
] ]
[[package]] [[package]]
name = "paste" name = "paste"
version = "1.0.4" version = "1.0.5"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c5d65c4d95931acda4498f675e332fcbdc9a06705cd07086c510e9b6009cd1c1" checksum = "acbf547ad0c65e31259204bd90935776d1c693cec2f4ff7abb7a1bbbd40dfe58"
[[package]] [[package]]
name = "pbkdf2" name = "pbkdf2"
@ -1379,33 +1368,13 @@ dependencies = [
"siphasher", "siphasher",
] ]
[[package]]
name = "pin-project"
version = "0.4.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2ffbc8e94b38ea3d2d8ba92aea2983b503cd75d0888d75b86bb37970b5698e15"
dependencies = [
"pin-project-internal 0.4.27",
]
[[package]] [[package]]
name = "pin-project" name = "pin-project"
version = "1.0.5" version = "1.0.5"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "96fa8ebb90271c4477f144354485b8068bd8f6b78b428b01ba892ca26caf0b63" checksum = "96fa8ebb90271c4477f144354485b8068bd8f6b78b428b01ba892ca26caf0b63"
dependencies = [ dependencies = [
"pin-project-internal 1.0.5", "pin-project-internal",
]
[[package]]
name = "pin-project-internal"
version = "0.4.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "65ad2ae56b6abe3a1ee25f15ee605bacadb9a764edaba9c2bf4103800d4a1895"
dependencies = [
"proc-macro2",
"quote",
"syn",
] ]
[[package]] [[package]]
@ -1421,9 +1390,9 @@ dependencies = [
[[package]] [[package]]
name = "pin-project-lite" name = "pin-project-lite"
version = "0.2.4" 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 = "439697af366c49a6d0a010c56a0d97685bc140ce0d377b13a2ea2aa42d64a827" checksum = "dc0e1f259c92177c30a4c9d177246edd0a3568b25756a977d0632cf8fa37e905"
[[package]] [[package]]
name = "pin-utils" name = "pin-utils"
@ -1502,9 +1471,9 @@ dependencies = [
[[package]] [[package]]
name = "quote" name = "quote"
version = "1.0.8" version = "1.0.9"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "991431c3519a3f36861882da93630ce66b52918dcf1b8e2fd66b397fc96f28df" checksum = "c3d0b9745dc2debf507c8422de05d7226cc1f0644216dfdfead988f9b1ab32a7"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
] ]
@ -1531,7 +1500,7 @@ checksum = "0ef9e7e66b4468674bfcb0c81af8b7fa0bb154fa9f28eb840da5c447baeb8d7e"
dependencies = [ dependencies = [
"libc", "libc",
"rand_chacha 0.3.0", "rand_chacha 0.3.0",
"rand_core 0.6.1", "rand_core 0.6.2",
"rand_hc 0.3.0", "rand_hc 0.3.0",
] ]
@ -1552,7 +1521,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e12735cf05c9e10bf21534da50a147b924d555dc7a547c42e6bb2d5b6017ae0d" checksum = "e12735cf05c9e10bf21534da50a147b924d555dc7a547c42e6bb2d5b6017ae0d"
dependencies = [ dependencies = [
"ppv-lite86", "ppv-lite86",
"rand_core 0.6.1", "rand_core 0.6.2",
] ]
[[package]] [[package]]
@ -1566,9 +1535,9 @@ dependencies = [
[[package]] [[package]]
name = "rand_core" name = "rand_core"
version = "0.6.1" version = "0.6.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c026d7df8b298d90ccbbc5190bd04d85e159eaf5576caeacf8741da93ccbd2e5" checksum = "34cf66eb183df1c5876e2dcf6b13d57340741e8dc255b48e40a26de954d06ae7"
dependencies = [ dependencies = [
"getrandom 0.2.2", "getrandom 0.2.2",
] ]
@ -1588,7 +1557,7 @@ version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3190ef7066a446f2e7f42e239d161e905420ccab01eb967c9eb27d21b2322a73" checksum = "3190ef7066a446f2e7f42e239d161e905420ccab01eb967c9eb27d21b2322a73"
dependencies = [ dependencies = [
"rand_core 0.6.1", "rand_core 0.6.2",
] ]
[[package]] [[package]]
@ -1608,9 +1577,9 @@ checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce"
[[package]] [[package]]
name = "redox_syscall" name = "redox_syscall"
version = "0.2.4" 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 = "05ec8ca9416c5ea37062b502703cd7fcb207736bc294f6e0cf367ac6fc234570" checksum = "94341e4e44e24f6b591b59e47a8a027df12e008d73fd5672dbea9cc22f4507d9"
dependencies = [ dependencies = [
"bitflags", "bitflags",
] ]
@ -1628,21 +1597,20 @@ dependencies = [
[[package]] [[package]]
name = "regex" name = "regex"
version = "1.4.3" version = "1.4.5"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d9251239e129e16308e70d853559389de218ac275b515068abc96829d05b948a" checksum = "957056ecddbeba1b26965114e191d2e8589ce74db242b6ea25fc4062427a5c19"
dependencies = [ dependencies = [
"aho-corasick", "aho-corasick",
"memchr", "memchr",
"regex-syntax", "regex-syntax",
"thread_local",
] ]
[[package]] [[package]]
name = "regex-syntax" name = "regex-syntax"
version = "0.6.22" version = "0.6.23"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b5eb417147ba9860a96cfe72a0b93bf88fee1744b5636ec99ab20c1aa9376581" checksum = "24d5f089152e60f62d28b835fbff2cd2e8dc0baf1ac13343bef92ab7eed84548"
[[package]] [[package]]
name = "remove_dir_all" name = "remove_dir_all"
@ -1655,9 +1623,9 @@ dependencies = [
[[package]] [[package]]
name = "reqwest" name = "reqwest"
version = "0.11.0" version = "0.11.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fd281b1030aa675fb90aa994d07187645bb3c8fc756ca766e7c3070b439de9de" checksum = "bf12057f289428dbf5c591c74bf10392e4a8003f993405a902f20117019022d4"
dependencies = [ dependencies = [
"base64", "base64",
"bytes", "bytes",
@ -1690,7 +1658,7 @@ dependencies = [
[[package]] [[package]]
name = "ruma" name = "ruma"
version = "0.0.2" version = "0.0.2"
source = "git+https://github.com/ruma/ruma?rev=d6aa37c848b7f682a98c25b346899e284ffc6df7#d6aa37c848b7f682a98c25b346899e284ffc6df7" source = "git+https://github.com/ruma/ruma?rev=c27e66741a8cb0cf5dba45ae3a977f4d6bba715d#c27e66741a8cb0cf5dba45ae3a977f4d6bba715d"
dependencies = [ dependencies = [
"assign", "assign",
"js_int", "js_int",
@ -1706,7 +1674,7 @@ dependencies = [
[[package]] [[package]]
name = "ruma-api" name = "ruma-api"
version = "0.17.0-alpha.2" version = "0.17.0-alpha.2"
source = "git+https://github.com/ruma/ruma?rev=d6aa37c848b7f682a98c25b346899e284ffc6df7#d6aa37c848b7f682a98c25b346899e284ffc6df7" source = "git+https://github.com/ruma/ruma?rev=c27e66741a8cb0cf5dba45ae3a977f4d6bba715d#c27e66741a8cb0cf5dba45ae3a977f4d6bba715d"
dependencies = [ dependencies = [
"http", "http",
"percent-encoding", "percent-encoding",
@ -1721,7 +1689,7 @@ dependencies = [
[[package]] [[package]]
name = "ruma-api-macros" name = "ruma-api-macros"
version = "0.17.0-alpha.2" version = "0.17.0-alpha.2"
source = "git+https://github.com/ruma/ruma?rev=d6aa37c848b7f682a98c25b346899e284ffc6df7#d6aa37c848b7f682a98c25b346899e284ffc6df7" source = "git+https://github.com/ruma/ruma?rev=c27e66741a8cb0cf5dba45ae3a977f4d6bba715d#c27e66741a8cb0cf5dba45ae3a977f4d6bba715d"
dependencies = [ dependencies = [
"proc-macro-crate", "proc-macro-crate",
"proc-macro2", "proc-macro2",
@ -1732,7 +1700,7 @@ dependencies = [
[[package]] [[package]]
name = "ruma-client-api" name = "ruma-client-api"
version = "0.10.0-alpha.2" version = "0.10.0-alpha.2"
source = "git+https://github.com/ruma/ruma?rev=d6aa37c848b7f682a98c25b346899e284ffc6df7#d6aa37c848b7f682a98c25b346899e284ffc6df7" source = "git+https://github.com/ruma/ruma?rev=c27e66741a8cb0cf5dba45ae3a977f4d6bba715d#c27e66741a8cb0cf5dba45ae3a977f4d6bba715d"
dependencies = [ dependencies = [
"assign", "assign",
"http", "http",
@ -1751,7 +1719,7 @@ dependencies = [
[[package]] [[package]]
name = "ruma-common" name = "ruma-common"
version = "0.3.0-alpha.1" version = "0.3.0-alpha.1"
source = "git+https://github.com/ruma/ruma?rev=d6aa37c848b7f682a98c25b346899e284ffc6df7#d6aa37c848b7f682a98c25b346899e284ffc6df7" source = "git+https://github.com/ruma/ruma?rev=c27e66741a8cb0cf5dba45ae3a977f4d6bba715d#c27e66741a8cb0cf5dba45ae3a977f4d6bba715d"
dependencies = [ dependencies = [
"js_int", "js_int",
"maplit", "maplit",
@ -1764,7 +1732,7 @@ dependencies = [
[[package]] [[package]]
name = "ruma-events" name = "ruma-events"
version = "0.22.0-alpha.2" version = "0.22.0-alpha.2"
source = "git+https://github.com/ruma/ruma?rev=d6aa37c848b7f682a98c25b346899e284ffc6df7#d6aa37c848b7f682a98c25b346899e284ffc6df7" source = "git+https://github.com/ruma/ruma?rev=c27e66741a8cb0cf5dba45ae3a977f4d6bba715d#c27e66741a8cb0cf5dba45ae3a977f4d6bba715d"
dependencies = [ dependencies = [
"js_int", "js_int",
"ruma-common", "ruma-common",
@ -1778,7 +1746,7 @@ dependencies = [
[[package]] [[package]]
name = "ruma-events-macros" name = "ruma-events-macros"
version = "0.22.0-alpha.2" version = "0.22.0-alpha.2"
source = "git+https://github.com/ruma/ruma?rev=d6aa37c848b7f682a98c25b346899e284ffc6df7#d6aa37c848b7f682a98c25b346899e284ffc6df7" source = "git+https://github.com/ruma/ruma?rev=c27e66741a8cb0cf5dba45ae3a977f4d6bba715d#c27e66741a8cb0cf5dba45ae3a977f4d6bba715d"
dependencies = [ dependencies = [
"proc-macro-crate", "proc-macro-crate",
"proc-macro2", "proc-macro2",
@ -1789,7 +1757,7 @@ dependencies = [
[[package]] [[package]]
name = "ruma-federation-api" name = "ruma-federation-api"
version = "0.1.0-alpha.1" version = "0.1.0-alpha.1"
source = "git+https://github.com/ruma/ruma?rev=d6aa37c848b7f682a98c25b346899e284ffc6df7#d6aa37c848b7f682a98c25b346899e284ffc6df7" source = "git+https://github.com/ruma/ruma?rev=c27e66741a8cb0cf5dba45ae3a977f4d6bba715d#c27e66741a8cb0cf5dba45ae3a977f4d6bba715d"
dependencies = [ dependencies = [
"js_int", "js_int",
"ruma-api", "ruma-api",
@ -1804,7 +1772,7 @@ dependencies = [
[[package]] [[package]]
name = "ruma-identifiers" name = "ruma-identifiers"
version = "0.18.0-alpha.1" version = "0.18.0-alpha.1"
source = "git+https://github.com/ruma/ruma?rev=d6aa37c848b7f682a98c25b346899e284ffc6df7#d6aa37c848b7f682a98c25b346899e284ffc6df7" source = "git+https://github.com/ruma/ruma?rev=c27e66741a8cb0cf5dba45ae3a977f4d6bba715d#c27e66741a8cb0cf5dba45ae3a977f4d6bba715d"
dependencies = [ dependencies = [
"paste", "paste",
"ruma-identifiers-macros", "ruma-identifiers-macros",
@ -1817,7 +1785,7 @@ dependencies = [
[[package]] [[package]]
name = "ruma-identifiers-macros" name = "ruma-identifiers-macros"
version = "0.18.0-alpha.1" version = "0.18.0-alpha.1"
source = "git+https://github.com/ruma/ruma?rev=d6aa37c848b7f682a98c25b346899e284ffc6df7#d6aa37c848b7f682a98c25b346899e284ffc6df7" source = "git+https://github.com/ruma/ruma?rev=c27e66741a8cb0cf5dba45ae3a977f4d6bba715d#c27e66741a8cb0cf5dba45ae3a977f4d6bba715d"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
@ -1828,12 +1796,12 @@ dependencies = [
[[package]] [[package]]
name = "ruma-identifiers-validation" name = "ruma-identifiers-validation"
version = "0.2.0" version = "0.2.0"
source = "git+https://github.com/ruma/ruma?rev=d6aa37c848b7f682a98c25b346899e284ffc6df7#d6aa37c848b7f682a98c25b346899e284ffc6df7" source = "git+https://github.com/ruma/ruma?rev=c27e66741a8cb0cf5dba45ae3a977f4d6bba715d#c27e66741a8cb0cf5dba45ae3a977f4d6bba715d"
[[package]] [[package]]
name = "ruma-serde" name = "ruma-serde"
version = "0.3.0" version = "0.3.0"
source = "git+https://github.com/ruma/ruma?rev=d6aa37c848b7f682a98c25b346899e284ffc6df7#d6aa37c848b7f682a98c25b346899e284ffc6df7" source = "git+https://github.com/ruma/ruma?rev=c27e66741a8cb0cf5dba45ae3a977f4d6bba715d#c27e66741a8cb0cf5dba45ae3a977f4d6bba715d"
dependencies = [ dependencies = [
"form_urlencoded", "form_urlencoded",
"itoa", "itoa",
@ -1846,7 +1814,7 @@ dependencies = [
[[package]] [[package]]
name = "ruma-serde-macros" name = "ruma-serde-macros"
version = "0.3.0" version = "0.3.0"
source = "git+https://github.com/ruma/ruma?rev=d6aa37c848b7f682a98c25b346899e284ffc6df7#d6aa37c848b7f682a98c25b346899e284ffc6df7" source = "git+https://github.com/ruma/ruma?rev=c27e66741a8cb0cf5dba45ae3a977f4d6bba715d#c27e66741a8cb0cf5dba45ae3a977f4d6bba715d"
dependencies = [ dependencies = [
"proc-macro-crate", "proc-macro-crate",
"proc-macro2", "proc-macro2",
@ -1899,9 +1867,9 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd"
[[package]] [[package]]
name = "security-framework" name = "security-framework"
version = "2.0.0" version = "2.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c1759c2e3c8580017a484a7ac56d3abc5a6c1feadf88db2f3633f12ae4268c69" checksum = "d493c5f39e02dfb062cd8f33301f90f9b13b650e8c1b1d0fd75c19dd64bff69d"
dependencies = [ dependencies = [
"bitflags", "bitflags",
"core-foundation", "core-foundation",
@ -1912,9 +1880,9 @@ dependencies = [
[[package]] [[package]]
name = "security-framework-sys" name = "security-framework-sys"
version = "2.0.0" version = "2.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f99b9d5e26d2a71633cc4f2ebae7cc9f874044e0c351a27e17892d76dce5678b" checksum = "dee48cdde5ed250b0d3252818f646e174ab414036edb884dde62d80a3ac6082d"
dependencies = [ dependencies = [
"core-foundation-sys", "core-foundation-sys",
"libc", "libc",
@ -1943,18 +1911,18 @@ checksum = "f638d531eccd6e23b980caf34876660d38e265409d8e99b397ab71eb3612fad0"
[[package]] [[package]]
name = "serde" name = "serde"
version = "1.0.123" version = "1.0.124"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "92d5161132722baa40d802cc70b15262b98258453e85e5d1d365c757c73869ae" checksum = "bd761ff957cb2a45fbb9ab3da6512de9de55872866160b23c25f1a841e99d29f"
dependencies = [ dependencies = [
"serde_derive", "serde_derive",
] ]
[[package]] [[package]]
name = "serde_derive" name = "serde_derive"
version = "1.0.123" version = "1.0.124"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9391c295d64fc0abb2c556bad848f33cb8296276b1ad2677d1ae1ace4f258f31" checksum = "1800f7693e94e186f5e25a28291ae1570da908aff7d97a095dec1e56ff99069b"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
@ -1963,9 +1931,9 @@ dependencies = [
[[package]] [[package]]
name = "serde_json" name = "serde_json"
version = "1.0.62" version = "1.0.64"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ea1c6153794552ea7cf7cf63b1231a25de00ec90db326ba6264440fa08e31486" checksum = "799e97dc9fdae36a5c8b8f2cae9ce2ee9fdce2058c57a93e6099d919fd982f79"
dependencies = [ dependencies = [
"itoa", "itoa",
"ryu", "ryu",
@ -1997,7 +1965,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fa827a14b29ab7f44778d14a88d3cb76e949c45083f7dbfa507d0cb699dc12de" checksum = "fa827a14b29ab7f44778d14a88d3cb76e949c45083f7dbfa507d0cb699dc12de"
dependencies = [ dependencies = [
"block-buffer", "block-buffer",
"cfg-if 1.0.0", "cfg-if",
"cpuid-bool 0.1.2", "cpuid-bool 0.1.2",
"digest", "digest",
"opaque-debug", "opaque-debug",
@ -2052,7 +2020,7 @@ version = "0.3.19"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "122e570113d28d773067fab24266b66753f6ea915758651696b6e35e49f88d6e" checksum = "122e570113d28d773067fab24266b66753f6ea915758651696b6e35e49f88d6e"
dependencies = [ dependencies = [
"cfg-if 1.0.0", "cfg-if",
"libc", "libc",
"winapi", "winapi",
] ]
@ -2154,9 +2122,9 @@ checksum = "1e81da0851ada1f3e9d4312c704aa4f8806f0f9d69faaf8df2f3464b4a9437c2"
[[package]] [[package]]
name = "syn" name = "syn"
version = "1.0.60" version = "1.0.64"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c700597eca8a5a762beb35753ef6b94df201c81cca676604f547495a0d7f0081" checksum = "3fd9d1e9976102a03c542daa2eff1b43f9d72306342f3f8b3ed5fb8908195d6f"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
@ -2181,10 +2149,10 @@ version = "3.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dac1c663cfc93810f88aed9b8941d48cabf856a1b111c29a40439018d870eb22" checksum = "dac1c663cfc93810f88aed9b8941d48cabf856a1b111c29a40439018d870eb22"
dependencies = [ dependencies = [
"cfg-if 1.0.0", "cfg-if",
"libc", "libc",
"rand 0.8.3", "rand 0.8.3",
"redox_syscall 0.2.4", "redox_syscall 0.2.5",
"remove_dir_all", "remove_dir_all",
"winapi", "winapi",
] ]
@ -2211,33 +2179,24 @@ dependencies = [
[[package]] [[package]]
name = "thiserror" name = "thiserror"
version = "1.0.23" version = "1.0.24"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "76cc616c6abf8c8928e2fdcc0dbfab37175edd8fb49a4641066ad1364fdab146" checksum = "e0f4a65597094d4483ddaed134f409b2cb7c1beccf25201a9f73c719254fa98e"
dependencies = [ dependencies = [
"thiserror-impl", "thiserror-impl",
] ]
[[package]] [[package]]
name = "thiserror-impl" name = "thiserror-impl"
version = "1.0.23" version = "1.0.24"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9be73a2caec27583d0046ef3796c3794f868a5bc813db689eed00c7631275cd1" checksum = "7765189610d8241a44529806d6fd1f2e0a08734313a35d5b3a556f92b381f3c0"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn", "syn",
] ]
[[package]]
name = "thread_local"
version = "1.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8018d24e04c95ac8790716a5987d0fec4f8b27249ffa0f7d33f1369bdfb88cbd"
dependencies = [
"once_cell",
]
[[package]] [[package]]
name = "time" name = "time"
version = "0.1.43" version = "0.1.43"
@ -2303,9 +2262,9 @@ checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c"
[[package]] [[package]]
name = "tokio" name = "tokio"
version = "1.2.0" version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e8190d04c665ea9e6b6a0dc45523ade572c088d2e6566244c1122671dbf4ae3a" checksum = "8d56477f6ed99e10225f38f9f75f872f29b8b8bd8c0b946f63345bb144e9eeda"
dependencies = [ dependencies = [
"autocfg", "autocfg",
"bytes", "bytes",
@ -2344,9 +2303,9 @@ dependencies = [
[[package]] [[package]]
name = "tokio-util" name = "tokio-util"
version = "0.6.3" version = "0.6.4"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ebb7cb2f00c5ae8df755b252306272cd1790d39728363936e01827e11f0b017b" checksum = "ec31e5cc6b46e653cf57762f36f71d5e6386391d88a72fd6db4508f8f676fb29"
dependencies = [ dependencies = [
"bytes", "bytes",
"futures-core", "futures-core",
@ -2373,11 +2332,11 @@ checksum = "360dfd1d6d30e05fda32ace2c8c70e9c0a9da713275777f5a4dbb8a1893930c6"
[[package]] [[package]]
name = "tracing" name = "tracing"
version = "0.1.23" version = "0.1.25"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f7d40a22fd029e33300d8d89a5cc8ffce18bb7c587662f54629e94c9de5487f3" checksum = "01ebdc2bb4498ab1ab5f5b73c5803825e60199229ccba0698170e3be0e7f959f"
dependencies = [ dependencies = [
"cfg-if 1.0.0", "cfg-if",
"pin-project-lite", "pin-project-lite",
"tracing-attributes", "tracing-attributes",
"tracing-core", "tracing-core",
@ -2385,9 +2344,9 @@ dependencies = [
[[package]] [[package]]
name = "tracing-attributes" name = "tracing-attributes"
version = "0.1.12" version = "0.1.15"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "43f080ea7e4107844ef4766459426fa2d5c1ada2e47edba05dc7fa99d9629f47" checksum = "c42e6fa53307c8a17e4ccd4dc81cf5ec38db9209f59b222210375b54ee40d1e2"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
@ -2405,11 +2364,11 @@ dependencies = [
[[package]] [[package]]
name = "tracing-futures" name = "tracing-futures"
version = "0.2.4" 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 = "ab7bb6f14721aa00656086e9335d363c5c8747bae02ebe32ea2c7dece5689b4c" checksum = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2"
dependencies = [ dependencies = [
"pin-project 0.4.27", "pin-project",
"tracing", "tracing",
] ]
@ -2421,9 +2380,9 @@ checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642"
[[package]] [[package]]
name = "typenum" name = "typenum"
version = "1.12.0" version = "1.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "373c8a200f9e67a0c95e62a4f52fbf80c23b4381c05a17845531982fa99e6b33" checksum = "879f6906492a7cd215bfa4cf595b600146ccfac0c79bcbd1f3000162af5e8b06"
[[package]] [[package]]
name = "unicode-bidi" name = "unicode-bidi"
@ -2473,9 +2432,9 @@ dependencies = [
[[package]] [[package]]
name = "url" name = "url"
version = "2.2.0" version = "2.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5909f2b0817350449ed73e8bcd81c8c3c8d9a7a5d8acba4b27db277f1868976e" checksum = "9ccd964113622c8e9322cfac19eb1004a07e636c545f325da085d5cdde6f1f8b"
dependencies = [ dependencies = [
"form_urlencoded", "form_urlencoded",
"idna", "idna",
@ -2535,11 +2494,11 @@ checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6"
[[package]] [[package]]
name = "wasm-bindgen" name = "wasm-bindgen"
version = "0.2.70" version = "0.2.71"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "55c0f7123de74f0dab9b7d00fd614e7b19349cd1e2f5252bbe9b1754b59433be" checksum = "7ee1280240b7c461d6a0071313e08f34a60b0365f14260362e5a2b17d1d31aa7"
dependencies = [ dependencies = [
"cfg-if 1.0.0", "cfg-if",
"serde", "serde",
"serde_json", "serde_json",
"wasm-bindgen-macro", "wasm-bindgen-macro",
@ -2547,9 +2506,9 @@ dependencies = [
[[package]] [[package]]
name = "wasm-bindgen-backend" name = "wasm-bindgen-backend"
version = "0.2.70" version = "0.2.71"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7bc45447f0d4573f3d65720f636bbcc3dd6ce920ed704670118650bcd47764c7" checksum = "5b7d8b6942b8bb3a9b0e73fc79b98095a27de6fa247615e59d096754a3bc2aa8"
dependencies = [ dependencies = [
"bumpalo", "bumpalo",
"lazy_static", "lazy_static",
@ -2562,11 +2521,11 @@ dependencies = [
[[package]] [[package]]
name = "wasm-bindgen-futures" name = "wasm-bindgen-futures"
version = "0.4.20" version = "0.4.21"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3de431a2910c86679c34283a33f66f4e4abd7e0aec27b6669060148872aadf94" checksum = "8e67a5806118af01f0d9045915676b22aaebecf4178ae7021bc171dab0b897ab"
dependencies = [ dependencies = [
"cfg-if 1.0.0", "cfg-if",
"js-sys", "js-sys",
"wasm-bindgen", "wasm-bindgen",
"web-sys", "web-sys",
@ -2574,9 +2533,9 @@ dependencies = [
[[package]] [[package]]
name = "wasm-bindgen-macro" name = "wasm-bindgen-macro"
version = "0.2.70" version = "0.2.71"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3b8853882eef39593ad4174dd26fc9865a64e84026d223f63bb2c42affcbba2c" checksum = "e5ac38da8ef716661f0f36c0d8320b89028efe10c7c0afde65baffb496ce0d3b"
dependencies = [ dependencies = [
"quote", "quote",
"wasm-bindgen-macro-support", "wasm-bindgen-macro-support",
@ -2584,9 +2543,9 @@ dependencies = [
[[package]] [[package]]
name = "wasm-bindgen-macro-support" name = "wasm-bindgen-macro-support"
version = "0.2.70" version = "0.2.71"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4133b5e7f2a531fa413b3a1695e925038a05a71cf67e87dafa295cb645a01385" checksum = "cc053ec74d454df287b9374ee8abb36ffd5acb95ba87da3ba5b7d3fe20eb401e"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
@ -2597,15 +2556,15 @@ dependencies = [
[[package]] [[package]]
name = "wasm-bindgen-shared" name = "wasm-bindgen-shared"
version = "0.2.70" version = "0.2.71"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dd4945e4943ae02d15c13962b38a5b1e81eadd4b71214eee75af64a4d6a4fd64" checksum = "7d6f8ec44822dd71f5f221a5847fb34acd9060535c1211b70a05844c0f6383b1"
[[package]] [[package]]
name = "web-sys" name = "web-sys"
version = "0.3.47" version = "0.3.48"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c40dc691fc48003eba817c38da7113c15698142da971298003cac3ef175680b3" checksum = "ec600b26223b2948cedfde2a0aa6756dcf1fef616f43d7b3097aaf53a6c4d92b"
dependencies = [ dependencies = [
"js-sys", "js-sys",
"wasm-bindgen", "wasm-bindgen",

View File

@ -8,11 +8,7 @@ use crate::state::DiceBotState;
use dirs; use dirs;
use futures::stream::{self, StreamExt}; use futures::stream::{self, StreamExt};
use log::info; use log::info;
use matrix_sdk::{ use matrix_sdk::{self, identifiers::EventId, room::Joined, Client, ClientConfig, SyncSettings};
self,
identifiers::{EventId, RoomId},
Client, ClientConfig, JoinedRoom, SyncSettings,
};
use std::clone::Clone; use std::clone::Clone;
use std::path::PathBuf; use std::path::PathBuf;
use std::sync::{Arc, RwLock}; use std::sync::{Arc, RwLock};
@ -62,11 +58,11 @@ async fn handle_single_result(
client: &Client, client: &Client,
cmd_result: &ExecutionResult, cmd_result: &ExecutionResult,
respond_to: &str, respond_to: &str,
room_id: &RoomId, room: &Joined,
event_id: EventId, event_id: EventId,
) { ) {
let html = cmd_result.message_html(respond_to); let html = cmd_result.message_html(respond_to);
matrix::send_message(client, room_id, &html, Some(event_id)).await; matrix::send_message(client, room.room_id(), &html, Some(event_id)).await;
} }
/// Handle responding to multiple commands being executed. Will print /// Handle responding to multiple commands being executed. Will print
@ -75,7 +71,7 @@ async fn handle_multiple_results(
client: &Client, client: &Client,
results: &[(&str, ExecutionResult)], results: &[(&str, ExecutionResult)],
respond_to: &str, respond_to: &str,
room_id: &RoomId, room: &Joined,
) { ) {
let errors: Vec<(&str, &ExecutionError)> = results let errors: Vec<(&str, &ExecutionError)> = results
.into_iter() .into_iter()
@ -103,7 +99,7 @@ async fn handle_multiple_results(
.replace("\n", "<br/>") .replace("\n", "<br/>")
}; };
matrix::send_message(client, room_id, &message, None).await; matrix::send_message(client, room.room_id(), &message, None).await;
} }
impl DiceBot { impl DiceBot {
@ -165,7 +161,7 @@ impl DiceBot {
info!("Performing intial sync (no commands will be responded to)"); info!("Performing intial sync (no commands will be responded to)");
self.client.sync_once(SyncSettings::default()).await?; self.client.sync_once(SyncSettings::default()).await?;
client.add_event_emitter(Box::new(self)).await; client.set_event_handler(Box::new(self)).await;
info!("Listening for commands"); info!("Listening for commands");
let token = client let token = client
@ -183,13 +179,12 @@ impl DiceBot {
async fn execute_commands( async fn execute_commands(
&self, &self,
room: &JoinedRoom, room: &Joined,
sender_username: &str, sender_username: &str,
msg_body: &str, msg_body: &str,
event_id: EventId, event_id: EventId,
) { ) {
let room_name: &str = &room.display_name().await.ok().unwrap_or_default(); let room_name: &str = &room.display_name().await.ok().unwrap_or_default();
let room_id = room.room_id().clone();
let commands: Vec<&str> = msg_body let commands: Vec<&str> = msg_body
.lines() .lines()
@ -223,12 +218,12 @@ impl DiceBot {
&self.client, &self.client,
&results[0].1, &results[0].1,
sender_username, sender_username,
&room_id, &room,
event_id, event_id,
) )
.await; .await;
} else if results.len() > 1 { } else if results.len() > 1 {
handle_multiple_results(&self.client, &results, sender_username, &room_id).await; handle_multiple_results(&self.client, &results, sender_username, &room).await;
} }
info!("[{}] {} executed: {}", room_name, sender_username, msg_body); info!("[{}] {} executed: {}", room_name, sender_username, msg_body);

View File

@ -8,11 +8,12 @@ use matrix_sdk::{
self, self,
events::{ events::{
room::member::{MemberEventContent, MembershipChange}, room::member::{MemberEventContent, MembershipChange},
room::message::{MessageEventContent, TextMessageEventContent}, room::message::{MessageEventContent, MessageType, TextMessageEventContent},
StrippedStateEvent, SyncMessageEvent, SyncStateEvent, StrippedStateEvent, SyncMessageEvent, SyncStateEvent,
}, },
identifiers::RoomId, identifiers::RoomId,
EventEmitter, RoomState, room::{Common, Invited, Joined},
EventHandler, Room,
}; };
use std::clone::Clone; use std::clone::Clone;
use std::ops::Sub; use std::ops::Sub;
@ -65,7 +66,11 @@ async fn should_process_message<'a>(
} }
let (msg_body, sender_username) = if let SyncMessageEvent { let (msg_body, sender_username) = if let SyncMessageEvent {
content: MessageEventContent::Text(TextMessageEventContent { body, .. }), content:
MessageEventContent {
msgtype: MessageType::Text(TextMessageEventContent { body, .. }),
..
},
sender, sender,
.. ..
} = event } = event
@ -93,30 +98,14 @@ fn should_process_event(db: &Database, room_id: &str, event_id: &str) -> bool {
}) })
} }
/// Convert room state object to the room ID and display name, if
/// possible. We only care about the room if it is a joined or left
/// room.
async fn convert_room_state(state: &RoomState) -> Option<(&RoomId, String)> {
match state {
RoomState::Joined(room) => Some((
room.room_id(),
room.display_name().await.ok().unwrap_or_default(),
)),
RoomState::Left(room) => Some((
room.room_id(),
room.display_name().await.ok().unwrap_or_default(),
)),
_ => None,
}
}
/// This event emitter listens for messages with dice rolling commands. /// This event emitter listens for messages with dice rolling commands.
/// Originally adapted from the matrix-rust-sdk examples. /// Originally adapted from the matrix-rust-sdk examples.
#[async_trait] #[async_trait]
impl EventEmitter for DiceBot { impl EventHandler for DiceBot {
async fn on_room_member(&self, state: RoomState, event: &SyncStateEvent<MemberEventContent>) { async fn on_room_member(&self, room: Room, event: &SyncStateEvent<MemberEventContent>) {
let (room_id, room_display_name) = match convert_room_state(&state).await { let room = Common::new(self.client.clone(), room);
Some((room_id, room_display_name)) => (room_id, room_display_name), let (room_id, room_display_name) = match room.display_name().await {
Ok(display_name) => (room.room_id(), display_name),
_ => return, _ => return,
}; };
@ -173,46 +162,54 @@ impl EventEmitter for DiceBot {
async fn on_stripped_state_member( async fn on_stripped_state_member(
&self, &self,
state: RoomState, room: Room,
event: &StrippedStateEvent<MemberEventContent>, event: &StrippedStateEvent<MemberEventContent>,
_: Option<MemberEventContent>, _: Option<MemberEventContent>,
) { ) {
if let RoomState::Invited(room) = state { let room = match Invited::new(self.client.clone(), room) {
if let Some(user_id) = self.client.user_id().await { Some(invited_room) => invited_room,
if event.state_key != user_id { _ => return,
return; };
}
}
info!("Autojoining room {}", room.display_name().await); if room.own_user_id().as_str() != event.state_key {
return;
}
if let Err(e) = self.client.join_room_by_id(&room.room_id()).await { // if let Some(user_id) = self.client.user_id().await {
warn!("Could not join room: {}", e.to_string()) // if event.state_key != user_id {
} // return;
// }
// }
info!(
"Autojoining room {}",
room.display_name().await.ok().unwrap_or_default()
);
if let Err(e) = self.client.join_room_by_id(&room.room_id()).await {
warn!("Could not join room: {}", e.to_string())
} }
} }
async fn on_room_message( async fn on_room_message(&self, room: Room, event: &SyncMessageEvent<MessageEventContent>) {
&self, let room = match Joined::new(self.client.clone(), room) {
state: RoomState, Some(joined_room) => joined_room,
event: &SyncMessageEvent<MessageEventContent>, _ => return,
) { };
if let RoomState::Joined(room) = state {
let room_id = room.room_id().as_str();
if !should_process_event(&self.db, room_id, event.event_id.as_str()) {
return;
}
let (msg_body, sender_username) = if let Ok((msg_body, sender_username)) = let room_id = room.room_id().as_str();
should_process_message(self, &event).await if !should_process_event(&self.db, room_id, event.event_id.as_str()) {
{ return;
}
let (msg_body, sender_username) =
if let Ok((msg_body, sender_username)) = should_process_message(self, &event).await {
(msg_body, sender_username) (msg_body, sender_username)
} else { } else {
return; return;
}; };
self.execute_commands(&room, &sender_username, &msg_body, event.event_id.clone()) self.execute_commands(&room, &sender_username, &msg_body, event.event_id.clone())
.await; .await;
}
} }
} }

View File

@ -19,7 +19,7 @@ impl Command for ResyncCommand {
record_room_information( record_room_information(
ctx.matrix_client, ctx.matrix_client,
&ctx.db, &ctx.db,
ctx.room.id, ctx.room_id(),
&ctx.room.display_name, &ctx.room.display_name,
our_username, our_username,
) )

View File

@ -13,7 +13,7 @@ impl Command for GetAllVariablesCommand {
} }
async fn execute(&self, ctx: &Context<'_>) -> ExecutionResult { async fn execute(&self, ctx: &Context<'_>) -> ExecutionResult {
let key = UserAndRoom(&ctx.username, &ctx.room.id.as_str()); let key = UserAndRoom(&ctx.username, &ctx.room_id().as_str());
let variables = ctx.db.variables.get_user_variables(&key)?; let variables = ctx.db.variables.get_user_variables(&key)?;
let mut variable_list: Vec<String> = variables let mut variable_list: Vec<String> = variables
@ -43,7 +43,7 @@ impl Command for GetVariableCommand {
async fn execute(&self, ctx: &Context<'_>) -> ExecutionResult { async fn execute(&self, ctx: &Context<'_>) -> ExecutionResult {
let name = &self.0; let name = &self.0;
let key = UserAndRoom(&ctx.username, &ctx.room.id.as_str()); let key = UserAndRoom(&ctx.username, &ctx.room_id().as_str());
let result = ctx.db.variables.get_user_variable(&key, name); let result = ctx.db.variables.get_user_variable(&key, name);
let value = match result { let value = match result {
@ -68,7 +68,7 @@ impl Command for SetVariableCommand {
async fn execute(&self, ctx: &Context<'_>) -> ExecutionResult { async fn execute(&self, ctx: &Context<'_>) -> ExecutionResult {
let name = &self.0; let name = &self.0;
let value = self.1; let value = self.1;
let key = UserAndRoom(&ctx.username, ctx.room.id.as_str()); let key = UserAndRoom(&ctx.username, ctx.room_id().as_str());
ctx.db.variables.set_user_variable(&key, name, value)?; ctx.db.variables.set_user_variable(&key, name, value)?;
@ -88,7 +88,7 @@ impl Command for DeleteVariableCommand {
async fn execute(&self, ctx: &Context<'_>) -> ExecutionResult { async fn execute(&self, ctx: &Context<'_>) -> ExecutionResult {
let name = &self.0; let name = &self.0;
let key = UserAndRoom(&ctx.username, ctx.room.id.as_str()); let key = UserAndRoom(&ctx.username, ctx.room_id().as_str());
let result = ctx.db.variables.delete_user_variable(&key, name); let result = ctx.db.variables.delete_user_variable(&key, name);
let value = match result { let value = match result {

View File

@ -1,7 +1,7 @@
use crate::db::Database; use crate::db::Database;
use matrix_sdk::identifiers::RoomId; use matrix_sdk::identifiers::RoomId;
use matrix_sdk::room::Joined;
use matrix_sdk::Client; use matrix_sdk::Client;
use matrix_sdk::JoinedRoom;
/// A context carried through the system providing access to things /// A context carried through the system providing access to things
/// like the database. /// like the database.
@ -14,6 +14,12 @@ pub struct Context<'a> {
pub message_body: &'a str, pub message_body: &'a str,
} }
impl Context<'_> {
pub fn room_id(&self) -> &RoomId {
self.room.id
}
}
#[derive(Clone)] #[derive(Clone)]
pub struct RoomContext<'a> { pub struct RoomContext<'a> {
pub id: &'a RoomId, pub id: &'a RoomId,
@ -21,7 +27,7 @@ pub struct RoomContext<'a> {
} }
impl RoomContext<'_> { impl RoomContext<'_> {
pub fn new_with_name<'a>(room: &'a JoinedRoom, display_name: &'a str) -> RoomContext<'a> { pub fn new_with_name<'a>(room: &'a Joined, display_name: &'a str) -> RoomContext<'a> {
RoomContext { RoomContext {
id: room.room_id(), id: room.room_id(),
display_name, display_name,

View File

@ -11,7 +11,7 @@ use futures::stream::{self, StreamExt, TryStreamExt};
/// it cannot find a variable defined, or if the database errors. /// it cannot find a variable defined, or if the database errors.
pub async fn calculate_dice_amount(amounts: &[Amount], ctx: &Context<'_>) -> Result<i32, BotError> { pub async fn calculate_dice_amount(amounts: &[Amount], ctx: &Context<'_>) -> Result<i32, BotError> {
let stream = stream::iter(amounts); let stream = stream::iter(amounts);
let key = UserAndRoom(&ctx.username, ctx.room.id.as_str()); let key = UserAndRoom(&ctx.username, ctx.room_id().as_str());
let variables = &ctx.db.variables.get_user_variables(&key)?; let variables = &ctx.db.variables.get_user_variables(&key)?;
use DiceRollingError::VariableNotFound; use DiceRollingError::VariableNotFound;

View File

@ -1,16 +1,12 @@
use log::error; use log::error;
use matrix_sdk::{events::room::message::NoticeMessageEventContent, RoomMember};
use matrix_sdk::{ use matrix_sdk::{
events::room::message::{InReplyTo, Relation}, events::room::message::{InReplyTo, Relation},
events::room::message::{MessageEventContent, MessageType},
events::AnyMessageEventContent,
identifiers::EventId, identifiers::EventId,
Error as MatrixError, Error as MatrixError,
}; };
use matrix_sdk::{
events::{
room::message::{MessageEventContent::Notice, NoticeMessageEventContent},
AnyMessageEventContent::RoomMessage,
},
RoomMember,
};
use matrix_sdk::{identifiers::RoomId, Client}; use matrix_sdk::{identifiers::RoomId, Client};
/// Extracts more detailed error messages out of a matrix SDK error. /// Extracts more detailed error messages out of a matrix SDK error.
@ -43,16 +39,24 @@ pub async fn send_message(
message: &str, message: &str,
reply_to: Option<EventId>, reply_to: Option<EventId>,
) { ) {
let room = match client.get_joined_room(room_id) {
Some(room) => room,
_ => return,
};
let plain = html2text::from_read(message.as_bytes(), message.len()); let plain = html2text::from_read(message.as_bytes(), message.len());
let mut content = NoticeMessageEventContent::html(plain.trim(), message); let mut content = MessageEventContent::new(MessageType::Notice(
NoticeMessageEventContent::html(plain.trim(), message),
));
content.relates_to = reply_to.map(|event_id| Relation::Reply { content.relates_to = reply_to.map(|event_id| Relation::Reply {
in_reply_to: InReplyTo { event_id }, in_reply_to: InReplyTo { event_id },
}); });
let response = RoomMessage(Notice(content)); let content = AnyMessageEventContent::RoomMessage(content);
let result = room.send(content, None).await;
let result = client.room_send(&room_id, response, None).await;
if let Err(e) = result { if let Err(e) = result {
let message = extract_error_message(e); let message = extract_error_message(e);
error!("Error sending message: {}", message); error!("Error sending message: {}", message);