diff --git a/Cargo.lock b/Cargo.lock index 8bdef3e4..6dbb6ba1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -77,9 +77,9 @@ dependencies = [ [[package]] name = "ammonia" -version = "3.1.0" +version = "3.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89eac85170f4b3fb3dc5e442c1cfb036cb8eecf9dbbd431a161ffad15d90ea3b" +checksum = "1ee7d6eb157f337c5cedc95ddf17f0cbc36d36eb7763c8e0d1c1aeb3722f6279" dependencies = [ "html5ever", "lazy_static", @@ -110,9 +110,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.38" +version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afddf7f520a80dbf76e6f50a35bca42a2331ef227a28b3b6dc5c2e2338d114b1" +checksum = "28b2cd92db5cbd74e8e5028f7e27dd7aa3090e89e4f2a197cc7c8dfb69c7063b" [[package]] name = "arrayref" @@ -154,9 +154,9 @@ dependencies = [ [[package]] name = "async-trait" -version = "0.1.42" +version = "0.1.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d3a45e77e34375a7923b1e8febb049bb011f064714a8e17a1a616fef01da13d" +checksum = "36ea56748e10732c49404c153638a15ec3d6211ec5ff35d9bb20e13b93576adf" dependencies = [ "proc-macro2", "quote", @@ -224,7 +224,7 @@ dependencies = [ "futures-core", "getrandom 0.2.2", "instant", - "pin-project 1.0.5", + "pin-project", "rand 0.8.3", "tokio", ] @@ -277,7 +277,7 @@ dependencies = [ "block-padding 0.1.5", "byte-tools", "byteorder", - "generic-array 0.12.3", + "generic-array 0.12.4", ] [[package]] @@ -316,9 +316,9 @@ checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" [[package]] name = "bumpalo" -version = "3.6.0" +version = "3.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "099e596ef14349721d9016f6b80dd3419ea1bf289ab9b44df8e4dfd3a005d5d9" +checksum = "63396b8a4b9de3f4fdfb320ab6080762242f66a8ef174c49d8e19b674db4cdbe" [[package]] name = "byte-tools" @@ -328,9 +328,9 @@ checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" [[package]] name = "byteorder" -version = "1.4.2" +version = "1.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae44d1a3d5a19df61dd0c8beb138458ac2a53a7ac09eba97d55592540004306b" +checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" [[package]] name = "bytes" @@ -372,9 +372,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.66" +version = "1.0.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c0496836a84f8d0495758516b8621a622beb77c0fed418570e50764093ced48" +checksum = "e3c69b077ad434294d3ce9f1f6143a2a4b89a8a2d54ef813d85003a4fd1137fd" [[package]] name = "cfg-if" @@ -485,9 +485,9 @@ dependencies = [ [[package]] name = "const_fn" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28b9d6de7f49e22cf97ad17fc4036ece69300032f45f78f30b4a4482cdc3f4a6" +checksum = "076a6803b0dacd6a88cfe64deba628b01533ff5ef265687e6938280c1afd0a28" [[package]] name = "constant_time_eq" @@ -534,12 +534,11 @@ dependencies = [ [[package]] name = "crossbeam-epoch" -version = "0.9.1" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1aaa739f95311c2c7887a76863f500026092fb1dce0161dab577e559ef3569d" +checksum = "2584f639eb95fea8c798496315b297cf81b9b58b6d30ab066a75455333cf4b12" dependencies = [ "cfg-if 1.0.0", - "const_fn", "crossbeam-utils", "lazy_static", "memoffset", @@ -548,9 +547,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.1" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02d96d1e189ef58269ebe5b97953da3274d83a93af647c2ddd6f9dab28cedb8d" +checksum = "e7e9d99fa91428effe99c5c6d4634cdeba32b8cf784fc428a2a687f61a952c49" dependencies = [ "autocfg", "cfg-if 1.0.0", @@ -603,7 +602,7 @@ version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" dependencies = [ - "generic-array 0.12.3", + "generic-array 0.12.4", ] [[package]] @@ -732,9 +731,9 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "form_urlencoded" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ece68d15c92e84fa4f19d3780f1294e5ca82a78a6d515f1efaabcc144688be00" +checksum = "5fc25a87fa4fd2094bffb06925852034d90a17f0d1e05197d4956d3555752191" dependencies = [ "matches", "percent-encoding", @@ -815,9 +814,9 @@ dependencies = [ [[package]] name = "futures" -version = "0.3.12" +version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da9052a1a50244d8d5aa9bf55cbc2fb6f357c86cc52e46c62ed390a7180cf150" +checksum = "7f55667319111d593ba876406af7c409c0ebb44dc4be6132a783ccf163ea14c1" dependencies = [ "futures-channel", "futures-core", @@ -830,9 +829,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.12" +version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2d31b7ec7efab6eefc7c57233bb10b847986139d88cc2f5a02a1ae6871a1846" +checksum = "8c2dd2df839b57db9ab69c2c9d8f3e8c81984781937fe2807dc6dcf3b2ad2939" dependencies = [ "futures-core", "futures-sink", @@ -840,15 +839,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.12" +version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79e5145dde8da7d1b3892dad07a9c98fc04bc39892b1ecc9692cf53e2b780a65" +checksum = "15496a72fabf0e62bdc3df11a59a3787429221dd0710ba8ef163d6f7a9112c94" [[package]] name = "futures-executor" -version = "0.3.12" +version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9e59fdc009a4b3096bf94f740a0f2424c082521f20a9b08c5c07c48d90fd9b9" +checksum = "891a4b7b96d84d5940084b2a37632dd65deeae662c114ceaa2c879629c9c0ad1" dependencies = [ "futures-core", "futures-task", @@ -857,9 +856,9 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.12" +version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28be053525281ad8259d47e4de5de657b25e7bac113458555bb4b70bc6870500" +checksum = "d71c2c65c57704c32f5241c1223167c2c3294fd34ac020c807ddbe6db287ba59" [[package]] name = "futures-lite" @@ -887,9 +886,9 @@ dependencies = [ [[package]] name = "futures-macro" -version = "0.3.12" +version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c287d25add322d9f9abdcdc5927ca398917996600182178774032e9f8258fedd" +checksum = "ea405816a5139fb39af82c2beb921d52143f556038378d6db21183a5c37fbfb7" dependencies = [ "proc-macro-hack", "proc-macro2", @@ -899,18 +898,15 @@ dependencies = [ [[package]] name = "futures-sink" -version = "0.3.12" +version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "caf5c69029bda2e743fddd0582d1083951d65cc9539aebf8812f36c3491342d6" +checksum = "85754d98985841b7d4f5e8e6fbfa4a4ac847916893ec511a2917ccd8525b8bb3" [[package]] name = "futures-task" -version = "0.3.12" +version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13de07eb8ea81ae445aca7b69f5f7bf15d7bf4912d8ca37d6645c77ae8a58d86" -dependencies = [ - "once_cell", -] +checksum = "fa189ef211c15ee602667a6fcfe1c1fd9e07d42250d2156382820fba33c9df80" [[package]] name = "futures-timer" @@ -924,9 +920,9 @@ dependencies = [ [[package]] name = "futures-util" -version = "0.3.12" +version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "632a8cd0f2a4b3fdea1657f08bde063848c3bd00f9bbf6e256b8be78802e624b" +checksum = "1812c7ab8aedf8d6f2701a43e1243acdbcc2b36ab26e2ad421eb99ac963d96d1" dependencies = [ "futures-channel", "futures-core", @@ -1018,9 +1014,9 @@ dependencies = [ [[package]] name = "generic-array" -version = "0.12.3" +version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c68f0274ae0e023facc3c97b2e00f076be70e254bc851d972503b328db79b2ec" +checksum = "ffdf9f34f1447443d37393cc6c2b8313aebddcd96906caf34e54c68d8e57d7bd" dependencies = [ "typenum", ] @@ -1148,7 +1144,7 @@ dependencies = [ "anyhow", "heck", "itertools 0.9.0", - "proc-macro-crate", + "proc-macro-crate 0.1.5", "proc-macro-error", "proc-macro2", "quote", @@ -1227,9 +1223,9 @@ dependencies = [ [[package]] name = "gstreamer" -version = "0.16.5" +version = "0.16.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d50f822055923f1cbede233aa5dfd4ee957cf328fb3076e330886094e11d6cf" +checksum = "9ff5d0f7ff308ae37e6eb47b6ded17785bdea06e438a708cd09e0288c1862f33" dependencies = [ "bitflags", "cfg-if 1.0.0", @@ -1369,9 +1365,9 @@ dependencies = [ [[package]] name = "gstreamer-video" -version = "0.16.6" +version = "0.16.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75fb6c5bcc0d406ca4a47938b8592121ff98e7a8f4303c24def1722df9f203d5" +checksum = "f7bbb1485d87469849ec45c08e03c2f280d3ea20ff3c439d03185be54e3ce98e" dependencies = [ "bitflags", "futures-channel", @@ -1450,9 +1446,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.0" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b67e66362108efccd8ac053abafc8b7a8d86a37e6e48fc4f6f7485eb5e9e6a5" +checksum = "fc018e188373e2777d0ef2467ebff62a08e66c3f5857b23c8fbec3018210dc00" dependencies = [ "bytes", "fnv", @@ -1465,7 +1461,6 @@ dependencies = [ "tokio", "tokio-util", "tracing", - "tracing-futures", ] [[package]] @@ -1544,9 +1539,9 @@ dependencies = [ [[package]] name = "http" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7245cd7449cc792608c3c8a9eaf69bd4eabbabf802713748fd739c98b82f0747" +checksum = "527e8c9ac747e28542699a951517aa9a6945af506cd1f2e1b53a576c17b6cc11" dependencies = [ "bytes", "fnv", @@ -1555,19 +1550,20 @@ dependencies = [ [[package]] name = "http-body" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2861bd27ee074e5ee891e8b539837a9430012e249d7f0ca2d795650f579c1994" +checksum = "5dfb77c123b4e2f72a2069aeae0b4b4949cc7e966df277813fc16347e7549737" dependencies = [ "bytes", "http", + "pin-project-lite", ] [[package]] name = "httparse" -version = "1.3.5" +version = "1.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "615caabe2c3160b313d52ccc905335f4ed5f10881dd63dc5699d47e90be85691" +checksum = "bc35c995b9d93ec174cf9a27d425c7892722101e14993cd227fdb51d70cf9589" [[package]] name = "httpdate" @@ -1577,9 +1573,9 @@ checksum = "494b4d60369511e7dea41cf646832512a94e542f68bb9c49e54518e0f468eb47" [[package]] name = "hyper" -version = "0.14.4" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8e946c2b1349055e0b72ae281b238baf1a3ea7307c7e9f9d64673bdd9c26ac7" +checksum = "8bf09f61b52cfcf4c00de50df88ae423d6c02354e385a86341133b5338630ad1" dependencies = [ "bytes", "futures-channel", @@ -1591,7 +1587,7 @@ dependencies = [ "httparse", "httpdate", "itoa", - "pin-project 1.0.5", + "pin-project", "socket2", "tokio", "tower-service", @@ -1614,9 +1610,9 @@ dependencies = [ [[package]] name = "idna" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de910d521f7cc3135c4de8db1cb910e0b5ed1dc6f57c381cd07e8e661ce10094" +checksum = "89829a5d69c23d348314a7ac337fe39173b61149a9864deabd260983aed48c21" dependencies = [ "matches", "unicode-bidi", @@ -1625,12 +1621,13 @@ dependencies = [ [[package]] name = "indexmap" -version = "1.6.1" +version = "1.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb1fa934250de4de8aef298d81c729a7d33d8c239daa3a7575e6b92bfc7313b" +checksum = "824845a0bf897a9042383849b02c1bc219c2383772efcd5c6f9766fa4b81aef3" dependencies = [ "autocfg", "hashbrown", + "serde", ] [[package]] @@ -1641,7 +1638,7 @@ checksum = "61124eeebbd69b8190558df225adf7e4caafce0d743919e5d6b19652314ec5ec" dependencies = [ "cfg-if 1.0.0", "js-sys", - "time 0.2.25", + "time 0.2.26", "wasm-bindgen", "web-sys", ] @@ -1678,9 +1675,9 @@ checksum = "dd25036021b0de88a0aff6b850051563c6516d0bf53f8638938edbb9de732736" [[package]] name = "js-sys" -version = "0.3.47" +version = "0.3.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cfb73131c35423a367daf8cbd24100af0d077668c8c2943f0e7dd775fef0f65" +checksum = "2d99f9e3e84b8f67f846ef5b4cbbc3b1c29f6c759fcbce6f01aa0e73d932a24c" dependencies = [ "wasm-bindgen", ] @@ -1702,9 +1699,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.86" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7282d924be3275cec7f6756ff4121987bc6481325397dde6ba3e7802b1a8b1c" +checksum = "9385f66bf6105b241aa65a61cb923ef20efc665cb9f9bb50ac2f0c4b7f378d41" [[package]] name = "libhandy" @@ -1794,9 +1791,9 @@ dependencies = [ [[package]] name = "lock_api" -version = "0.4.2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd96ffd135b2fd7b973ac026d28085defbe8983df057ced3eb4f2130b0831312" +checksum = "5a3c91c24eae6777794bb1997ad98bbb87daf92890acab859f7eaa4320333176" dependencies = [ "scopeguard", ] @@ -1871,7 +1868,7 @@ checksum = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" [[package]] name = "matrix-sdk" version = "0.2.0" -source = "git+https://github.com/matrix-org/matrix-rust-sdk.git?rev=e437aea01213338d7f11787411a025b6133efcff#e437aea01213338d7f11787411a025b6133efcff" +source = "git+https://github.com/matrix-org/matrix-rust-sdk.git?rev=ebcb2024d14614b8c984c5b95de5df04eec7933b#ebcb2024d14614b8c984c5b95de5df04eec7933b" dependencies = [ "backoff", "dashmap", @@ -1894,7 +1891,7 @@ dependencies = [ [[package]] name = "matrix-sdk-base" version = "0.2.0" -source = "git+https://github.com/matrix-org/matrix-rust-sdk.git?rev=e437aea01213338d7f11787411a025b6133efcff#e437aea01213338d7f11787411a025b6133efcff" +source = "git+https://github.com/matrix-org/matrix-rust-sdk.git?rev=ebcb2024d14614b8c984c5b95de5df04eec7933b#ebcb2024d14614b8c984c5b95de5df04eec7933b" dependencies = [ "chacha20poly1305", "dashmap", @@ -1917,21 +1914,23 @@ dependencies = [ [[package]] name = "matrix-sdk-common" version = "0.2.0" -source = "git+https://github.com/matrix-org/matrix-rust-sdk.git?rev=e437aea01213338d7f11787411a025b6133efcff#e437aea01213338d7f11787411a025b6133efcff" +source = "git+https://github.com/matrix-org/matrix-rust-sdk.git?rev=ebcb2024d14614b8c984c5b95de5df04eec7933b#ebcb2024d14614b8c984c5b95de5df04eec7933b" dependencies = [ "async-trait", + "futures", "futures-locks", "instant", "ruma", "serde", "tokio", "uuid", + "wasm-bindgen-futures", ] [[package]] name = "matrix-sdk-crypto" version = "0.2.0" -source = "git+https://github.com/matrix-org/matrix-rust-sdk.git?rev=e437aea01213338d7f11787411a025b6133efcff#e437aea01213338d7f11787411a025b6133efcff" +source = "git+https://github.com/matrix-org/matrix-rust-sdk.git?rev=ebcb2024d14614b8c984c5b95de5df04eec7933b#ebcb2024d14614b8c984c5b95de5df04eec7933b" dependencies = [ "aes-ctr", "aes-gcm", @@ -1939,6 +1938,7 @@ dependencies = [ "base64", "byteorder", "dashmap", + "futures", "getrandom 0.2.2", "hmac", "matrix-sdk-common", @@ -1979,9 +1979,9 @@ checksum = "0ee1c47aaa256ecabcaea351eae4a9b01ef39ed810004e298d2511ed284b1525" [[package]] name = "memoffset" -version = "0.6.1" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "157b4208e3059a8f9e78d559edc658e13df41410cb3ae03979c83130067fdd87" +checksum = "f83fb6581e8ed1f85fd45c116db8405483899489e38406156c25eb743554361d" dependencies = [ "autocfg", ] @@ -1994,9 +1994,9 @@ checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" [[package]] name = "mio" -version = "0.7.7" +version = "0.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e50ae3f04d169fcc9bde0b547d1c205219b7157e07ded9c5aff03e0637cb3ed7" +checksum = "cf80d3e903b34e0bd7282b218398aec54e082c840d9baf8339e0080a0c542956" dependencies = [ "libc", "log", @@ -2007,11 +2007,10 @@ dependencies = [ [[package]] name = "miow" -version = "0.3.6" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a33c1b55807fbed163481b5ba66db4b2fa6cde694a5027be10fb724206c5897" +checksum = "b9f1c5b025cda876f66ef43a113f91ebc9f4ccef34843000e0adf6ebbab84e21" dependencies = [ - "socket2", "winapi", ] @@ -2041,12 +2040,12 @@ dependencies = [ [[package]] name = "nb-connect" -version = "1.0.2" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8123a81538e457d44b933a02faf885d3fe8408806b23fa700e8f01c6c3a98998" +checksum = "a19900e7eee95eb2b3c2e26d12a874cc80aaf750e31be6fcbe743ead369fa45d" dependencies = [ "libc", - "winapi", + "socket2", ] [[package]] @@ -2093,9 +2092,9 @@ dependencies = [ [[package]] name = "num-bigint" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e9a41747ae4633fce5adffb4d2e81ffc5e89593cb19917f8fb2cc5ff76507bf" +checksum = "7d0a3d5e207573f948a9e5376662aa743a2ea13f7c50a554d7af443a73fbfeba" dependencies = [ "autocfg", "num-integer", @@ -2178,18 +2177,18 @@ dependencies = [ [[package]] name = "olm-sys" -version = "1.0.2" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0823939cee8b6f39ed0e39d8abf98919099f999ebef3eae2c67d9cd2e93ea008" +checksum = "9d29b3debd2916908e725d936ef5722d014a338a57c74e59dbf4c8c43855254d" dependencies = [ "cmake", ] [[package]] name = "once_cell" -version = "1.5.2" +version = "1.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13bd41f508810a131401606d54ac32a467c97172d74ba7662562ebba5ad07fa0" +checksum = "af8b08b04175473088b46763e51ee54da5f9a164bc162f615b91bc179dbf15a3" [[package]] name = "opaque-debug" @@ -2205,15 +2204,15 @@ checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" [[package]] name = "openssl" -version = "0.10.32" +version = "0.10.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "038d43985d1ddca7a9900630d8cd031b56e4794eecc2e9ea39dd17aa04399a70" +checksum = "a61075b62a23fef5a29815de7536d940aa35ce96d18ce0cc5076272db678a577" dependencies = [ "bitflags", "cfg-if 1.0.0", "foreign-types", - "lazy_static", "libc", + "once_cell", "openssl-sys", ] @@ -2225,9 +2224,9 @@ checksum = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de" [[package]] name = "openssl-sys" -version = "0.9.60" +version = "0.9.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "921fc71883267538946025deffb622905ecad223c28efbfdef9bb59a0175f3e6" +checksum = "313752393519e876837e09e1fa183ddef0be7735868dced3196f4472d536277f" dependencies = [ "autocfg", "cc", @@ -2282,23 +2281,23 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ccb628cad4f84851442432c60ad8e1f607e29752d0bf072cbd0baf28aa34272" +checksum = "fa7a782938e745763fe6907fc6ba86946d72f49fe7e21de074e08128a99fb018" dependencies = [ "cfg-if 1.0.0", "instant", "libc", - "redox_syscall 0.1.57", + "redox_syscall 0.2.5", "smallvec", "winapi", ] [[package]] name = "paste" -version = "1.0.4" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5d65c4d95931acda4498f675e332fcbdc9a06705cd07086c510e9b6009cd1c1" +checksum = "acbf547ad0c65e31259204bd90935776d1c693cec2f4ff7abb7a1bbbd40dfe58" [[package]] name = "pbkdf2" @@ -2398,38 +2397,18 @@ dependencies = [ [[package]] name = "pin-project" -version = "0.4.27" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ffbc8e94b38ea3d2d8ba92aea2983b503cd75d0888d75b86bb37970b5698e15" +checksum = "bc174859768806e91ae575187ada95c91a29e96a98dc5d2cd9a1fed039501ba6" dependencies = [ - "pin-project-internal 0.4.27", -] - -[[package]] -name = "pin-project" -version = "1.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96fa8ebb90271c4477f144354485b8068bd8f6b78b428b01ba892ca26caf0b63" -dependencies = [ - "pin-project-internal 1.0.5", + "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "0.4.27" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65ad2ae56b6abe3a1ee25f15ee605bacadb9a764edaba9c2bf4103800d4a1895" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "pin-project-internal" -version = "1.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "758669ae3558c6f74bd2a18b41f7ac0b5a195aea6639d6a9b5e5d1ad5ba24c0b" +checksum = "a490329918e856ed1b083f244e3bfe2d8c4f336407e4ea9e1a9f479ff09049e5" dependencies = [ "proc-macro2", "quote", @@ -2438,9 +2417,9 @@ dependencies = [ [[package]] name = "pin-project-lite" -version = "0.2.4" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "439697af366c49a6d0a010c56a0d97685bc140ce0d377b13a2ea2aa42d64a827" +checksum = "dc0e1f259c92177c30a4c9d177246edd0a3568b25756a977d0632cf8fa37e905" [[package]] name = "pin-utils" @@ -2456,11 +2435,11 @@ checksum = "3831453b3449ceb48b6d9c7ad7c96d5ea673e9b470a1dc578c2ce6521230884c" [[package]] name = "polling" -version = "2.0.2" +version = "2.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2a7bc6b2a29e632e45451c941832803a18cce6781db04de8a04696cdca8bde4" +checksum = "4fc12d774e799ee9ebae13f4076ca003b40d18a11ac0f3641e6f899618580b7b" dependencies = [ - "cfg-if 0.1.10", + "cfg-if 1.0.0", "libc", "log", "wepoll-sys", @@ -2515,6 +2494,16 @@ dependencies = [ "toml", ] +[[package]] +name = "proc-macro-crate" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41fdbd1df62156fbc5945f4762632564d7d038153091c3fcf1067f6aef7cff92" +dependencies = [ + "thiserror", + "toml", +] + [[package]] name = "proc-macro-error" version = "1.0.4" @@ -2553,18 +2542,18 @@ checksum = "bc881b2c22681370c6a780e47af9840ef841837bc98118431d4e1868bd0c1086" [[package]] name = "proc-macro2" -version = "1.0.24" +version = "1.0.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e0704ee1a7e00d7bb417d0770ea303c1bccbabf0ef1667dae92b5967f5f8a71" +checksum = "a152013215dca273577e18d2bf00fa862b89b24169fb78c4c95aeb07992c9cec" dependencies = [ "unicode-xid", ] [[package]] name = "quote" -version = "1.0.8" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "991431c3519a3f36861882da93630ce66b52918dcf1b8e2fd66b397fc96f28df" +checksum = "c3d0b9745dc2debf507c8422de05d7226cc1f0644216dfdfead988f9b1ab32a7" dependencies = [ "proc-macro2", ] @@ -2591,7 +2580,7 @@ checksum = "0ef9e7e66b4468674bfcb0c81af8b7fa0bb154fa9f28eb840da5c447baeb8d7e" dependencies = [ "libc", "rand_chacha 0.3.0", - "rand_core 0.6.1", + "rand_core 0.6.2", "rand_hc 0.3.0", ] @@ -2612,7 +2601,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e12735cf05c9e10bf21534da50a147b924d555dc7a547c42e6bb2d5b6017ae0d" dependencies = [ "ppv-lite86", - "rand_core 0.6.1", + "rand_core 0.6.2", ] [[package]] @@ -2626,9 +2615,9 @@ dependencies = [ [[package]] name = "rand_core" -version = "0.6.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c026d7df8b298d90ccbbc5190bd04d85e159eaf5576caeacf8741da93ccbd2e5" +checksum = "34cf66eb183df1c5876e2dcf6b13d57340741e8dc255b48e40a26de954d06ae7" dependencies = [ "getrandom 0.2.2", ] @@ -2648,7 +2637,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3190ef7066a446f2e7f42e239d161e905420ccab01eb967c9eb27d21b2322a73" dependencies = [ - "rand_core 0.6.1", + "rand_core 0.6.2", ] [[package]] @@ -2668,9 +2657,9 @@ checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" [[package]] name = "redox_syscall" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05ec8ca9416c5ea37062b502703cd7fcb207736bc294f6e0cf367ac6fc234570" +checksum = "94341e4e44e24f6b591b59e47a8a027df12e008d73fd5672dbea9cc22f4507d9" dependencies = [ "bitflags", ] @@ -2688,21 +2677,20 @@ dependencies = [ [[package]] name = "regex" -version = "1.4.3" +version = "1.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9251239e129e16308e70d853559389de218ac275b515068abc96829d05b948a" +checksum = "957056ecddbeba1b26965114e191d2e8589ce74db242b6ea25fc4062427a5c19" dependencies = [ "aho-corasick", "memchr", "regex-syntax", - "thread_local", ] [[package]] name = "regex-syntax" -version = "0.6.22" +version = "0.6.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5eb417147ba9860a96cfe72a0b93bf88fee1744b5636ec99ab20c1aa9376581" +checksum = "24d5f089152e60f62d28b835fbff2cd2e8dc0baf1ac13343bef92ab7eed84548" [[package]] name = "remove_dir_all" @@ -2715,9 +2703,9 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.11.0" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd281b1030aa675fb90aa994d07187645bb3c8fc756ca766e7c3070b439de9de" +checksum = "bf12057f289428dbf5c591c74bf10392e4a8003f993405a902f20117019022d4" dependencies = [ "base64", "bytes", @@ -2751,7 +2739,7 @@ dependencies = [ [[package]] name = "ruma" version = "0.0.2" -source = "git+https://github.com/ruma/ruma?rev=d6aa37c848b7f682a98c25b346899e284ffc6df7#d6aa37c848b7f682a98c25b346899e284ffc6df7" +source = "git+https://github.com/ruma/ruma?rev=e2728a70812412aade9322f6ad832731978a4240#e2728a70812412aade9322f6ad832731978a4240" dependencies = [ "assign", "js_int", @@ -2767,7 +2755,7 @@ dependencies = [ [[package]] name = "ruma-api" version = "0.17.0-alpha.2" -source = "git+https://github.com/ruma/ruma?rev=d6aa37c848b7f682a98c25b346899e284ffc6df7#d6aa37c848b7f682a98c25b346899e284ffc6df7" +source = "git+https://github.com/ruma/ruma?rev=e2728a70812412aade9322f6ad832731978a4240#e2728a70812412aade9322f6ad832731978a4240" dependencies = [ "http", "percent-encoding", @@ -2782,9 +2770,9 @@ dependencies = [ [[package]] name = "ruma-api-macros" version = "0.17.0-alpha.2" -source = "git+https://github.com/ruma/ruma?rev=d6aa37c848b7f682a98c25b346899e284ffc6df7#d6aa37c848b7f682a98c25b346899e284ffc6df7" +source = "git+https://github.com/ruma/ruma?rev=e2728a70812412aade9322f6ad832731978a4240#e2728a70812412aade9322f6ad832731978a4240" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 1.0.0", "proc-macro2", "quote", "syn", @@ -2793,7 +2781,7 @@ dependencies = [ [[package]] name = "ruma-client-api" version = "0.10.0-alpha.2" -source = "git+https://github.com/ruma/ruma?rev=d6aa37c848b7f682a98c25b346899e284ffc6df7#d6aa37c848b7f682a98c25b346899e284ffc6df7" +source = "git+https://github.com/ruma/ruma?rev=e2728a70812412aade9322f6ad832731978a4240#e2728a70812412aade9322f6ad832731978a4240" dependencies = [ "assign", "http", @@ -2811,21 +2799,24 @@ dependencies = [ [[package]] name = "ruma-common" -version = "0.3.0-alpha.1" -source = "git+https://github.com/ruma/ruma?rev=d6aa37c848b7f682a98c25b346899e284ffc6df7#d6aa37c848b7f682a98c25b346899e284ffc6df7" +version = "0.3.1" +source = "git+https://github.com/ruma/ruma?rev=e2728a70812412aade9322f6ad832731978a4240#e2728a70812412aade9322f6ad832731978a4240" dependencies = [ + "indexmap", "js_int", "maplit", "ruma-identifiers", "ruma-serde", "serde", "serde_json", + "tracing", + "wildmatch", ] [[package]] name = "ruma-events" version = "0.22.0-alpha.2" -source = "git+https://github.com/ruma/ruma?rev=d6aa37c848b7f682a98c25b346899e284ffc6df7#d6aa37c848b7f682a98c25b346899e284ffc6df7" +source = "git+https://github.com/ruma/ruma?rev=e2728a70812412aade9322f6ad832731978a4240#e2728a70812412aade9322f6ad832731978a4240" dependencies = [ "js_int", "ruma-common", @@ -2839,9 +2830,9 @@ dependencies = [ [[package]] name = "ruma-events-macros" version = "0.22.0-alpha.2" -source = "git+https://github.com/ruma/ruma?rev=d6aa37c848b7f682a98c25b346899e284ffc6df7#d6aa37c848b7f682a98c25b346899e284ffc6df7" +source = "git+https://github.com/ruma/ruma?rev=e2728a70812412aade9322f6ad832731978a4240#e2728a70812412aade9322f6ad832731978a4240" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 1.0.0", "proc-macro2", "quote", "syn", @@ -2850,7 +2841,7 @@ dependencies = [ [[package]] name = "ruma-federation-api" version = "0.1.0-alpha.1" -source = "git+https://github.com/ruma/ruma?rev=d6aa37c848b7f682a98c25b346899e284ffc6df7#d6aa37c848b7f682a98c25b346899e284ffc6df7" +source = "git+https://github.com/ruma/ruma?rev=e2728a70812412aade9322f6ad832731978a4240#e2728a70812412aade9322f6ad832731978a4240" dependencies = [ "js_int", "ruma-api", @@ -2864,8 +2855,8 @@ dependencies = [ [[package]] name = "ruma-identifiers" -version = "0.18.0-alpha.1" -source = "git+https://github.com/ruma/ruma?rev=d6aa37c848b7f682a98c25b346899e284ffc6df7#d6aa37c848b7f682a98c25b346899e284ffc6df7" +version = "0.18.1" +source = "git+https://github.com/ruma/ruma?rev=e2728a70812412aade9322f6ad832731978a4240#e2728a70812412aade9322f6ad832731978a4240" dependencies = [ "paste", "ruma-identifiers-macros", @@ -2877,8 +2868,8 @@ dependencies = [ [[package]] name = "ruma-identifiers-macros" -version = "0.18.0-alpha.1" -source = "git+https://github.com/ruma/ruma?rev=d6aa37c848b7f682a98c25b346899e284ffc6df7#d6aa37c848b7f682a98c25b346899e284ffc6df7" +version = "0.18.1" +source = "git+https://github.com/ruma/ruma?rev=e2728a70812412aade9322f6ad832731978a4240#e2728a70812412aade9322f6ad832731978a4240" dependencies = [ "proc-macro2", "quote", @@ -2888,13 +2879,13 @@ dependencies = [ [[package]] name = "ruma-identifiers-validation" -version = "0.2.0" -source = "git+https://github.com/ruma/ruma?rev=d6aa37c848b7f682a98c25b346899e284ffc6df7#d6aa37c848b7f682a98c25b346899e284ffc6df7" +version = "0.2.2" +source = "git+https://github.com/ruma/ruma?rev=e2728a70812412aade9322f6ad832731978a4240#e2728a70812412aade9322f6ad832731978a4240" [[package]] name = "ruma-serde" -version = "0.3.0" -source = "git+https://github.com/ruma/ruma?rev=d6aa37c848b7f682a98c25b346899e284ffc6df7#d6aa37c848b7f682a98c25b346899e284ffc6df7" +version = "0.3.1" +source = "git+https://github.com/ruma/ruma?rev=e2728a70812412aade9322f6ad832731978a4240#e2728a70812412aade9322f6ad832731978a4240" dependencies = [ "form_urlencoded", "itoa", @@ -2906,10 +2897,10 @@ dependencies = [ [[package]] name = "ruma-serde-macros" -version = "0.3.0" -source = "git+https://github.com/ruma/ruma?rev=d6aa37c848b7f682a98c25b346899e284ffc6df7#d6aa37c848b7f682a98c25b346899e284ffc6df7" +version = "0.3.1" +source = "git+https://github.com/ruma/ruma?rev=e2728a70812412aade9322f6ad832731978a4240#e2728a70812412aade9322f6ad832731978a4240" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 1.0.0", "proc-macro2", "quote", "syn", @@ -2986,9 +2977,9 @@ dependencies = [ [[package]] name = "security-framework" -version = "2.0.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1759c2e3c8580017a484a7ac56d3abc5a6c1feadf88db2f3633f12ae4268c69" +checksum = "3670b1d2fdf6084d192bc71ead7aabe6c06aa2ea3fbd9cc3ac111fa5c2b1bd84" dependencies = [ "bitflags", "core-foundation", @@ -2999,9 +2990,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.0.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f99b9d5e26d2a71633cc4f2ebae7cc9f874044e0c351a27e17892d76dce5678b" +checksum = "3676258fd3cfe2c9a0ec99ce3038798d847ce3e4bb17746373eb9f0f1ac16339" dependencies = [ "core-foundation-sys", "libc", @@ -3030,18 +3021,18 @@ checksum = "f638d531eccd6e23b980caf34876660d38e265409d8e99b397ab71eb3612fad0" [[package]] name = "serde" -version = "1.0.123" +version = "1.0.125" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92d5161132722baa40d802cc70b15262b98258453e85e5d1d365c757c73869ae" +checksum = "558dc50e1a5a5fa7112ca2ce4effcb321b0300c0d4ccf0776a9f60cd89031171" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.123" +version = "1.0.125" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9391c295d64fc0abb2c556bad848f33cb8296276b1ad2677d1ae1ace4f258f31" +checksum = "b093b7a2bb58203b5da3056c05b4ec1fed827dcfdb37347a8841695263b3d06d" dependencies = [ "proc-macro2", "quote", @@ -3050,9 +3041,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.62" +version = "1.0.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea1c6153794552ea7cf7cf63b1231a25de00ec90db326ba6264440fa08e31486" +checksum = "799e97dc9fdae36a5c8b8f2cae9ce2ee9fdce2058c57a93e6099d919fd982f79" dependencies = [ "itoa", "ryu", @@ -3115,9 +3106,9 @@ dependencies = [ [[package]] name = "siphasher" -version = "0.3.3" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa8f3741c7372e75519bd9346068370c9cdaabcc1f9599cbcf2a2719352286b7" +checksum = "cbce6d4507c7e4a3962091436e56e95290cb71fa302d0d270e32130b75fbff27" [[package]] name = "slab" @@ -3149,11 +3140,10 @@ checksum = "fe0f37c9e8f3c5a4a66ad655a93c74daac4ad00c441533bf5c6e7990bb42604e" [[package]] name = "socket2" -version = "0.3.19" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "122e570113d28d773067fab24266b66753f6ea915758651696b6e35e49f88d6e" +checksum = "9e3dfc207c526015c632472a77be09cf1b6e46866581aecae5cc38fb4235dea2" dependencies = [ - "cfg-if 1.0.0", "libc", "winapi", ] @@ -3201,9 +3191,9 @@ dependencies = [ [[package]] name = "standback" -version = "0.2.15" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2beb4d1860a61f571530b3f855a1b538d0200f7871c63331ecd6f17b1f014f8" +checksum = "e113fb6f3de07a243d434a56ec6f186dfd51cb08448239fe7bcae73f87ff28ff" dependencies = [ "version_check", ] @@ -3314,9 +3304,9 @@ checksum = "1e81da0851ada1f3e9d4312c704aa4f8806f0f9d69faaf8df2f3464b4a9437c2" [[package]] name = "syn" -version = "1.0.60" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c700597eca8a5a762beb35753ef6b94df201c81cca676604f547495a0d7f0081" +checksum = "48fe99c6bd8b1cc636890bcc071842de909d902c81ac7dab53ba33c421ab8ffb" dependencies = [ "proc-macro2", "quote", @@ -3359,7 +3349,7 @@ dependencies = [ "cfg-if 1.0.0", "libc", "rand 0.8.3", - "redox_syscall 0.2.4", + "redox_syscall 0.2.5", "remove_dir_all", "winapi", ] @@ -3386,33 +3376,24 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.23" +version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76cc616c6abf8c8928e2fdcc0dbfab37175edd8fb49a4641066ad1364fdab146" +checksum = "e0f4a65597094d4483ddaed134f409b2cb7c1beccf25201a9f73c719254fa98e" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.23" +version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9be73a2caec27583d0046ef3796c3794f868a5bc813db689eed00c7631275cd1" +checksum = "7765189610d8241a44529806d6fd1f2e0a08734313a35d5b3a556f92b381f3c0" dependencies = [ "proc-macro2", "quote", "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]] name = "time" version = "0.1.43" @@ -3425,9 +3406,9 @@ dependencies = [ [[package]] name = "time" -version = "0.2.25" +version = "0.2.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1195b046942c221454c2539395f85413b33383a067449d78aab2b7b052a142f7" +checksum = "08a8cbfbf47955132d0202d1662f49b2423ae35862aee471f3ba4b133358f372" dependencies = [ "const_fn", "libc", @@ -3463,9 +3444,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.1.1" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "317cca572a0e89c3ce0ca1f1bdc9369547fe318a683418e42ac8f59d14701023" +checksum = "5b5220f05bb7de7f3f53c7c065e1199b3172696fe2db9f9c4d8ad9b4ee74c342" dependencies = [ "tinyvec_macros", ] @@ -3478,9 +3459,9 @@ checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" [[package]] name = "tokio" -version = "1.2.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8190d04c665ea9e6b6a0dc45523ade572c088d2e6566244c1122671dbf4ae3a" +checksum = "134af885d758d645f0f0505c9a8b3f9bf8a348fd822e112ab5248138348f1722" dependencies = [ "autocfg", "bytes", @@ -3515,9 +3496,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.6.3" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebb7cb2f00c5ae8df755b252306272cd1790d39728363936e01827e11f0b017b" +checksum = "5143d049e85af7fbc36f5454d990e62c2df705b3589f123b71f441b6b59f443f" dependencies = [ "bytes", "futures-core", @@ -3544,9 +3525,9 @@ checksum = "360dfd1d6d30e05fda32ace2c8c70e9c0a9da713275777f5a4dbb8a1893930c6" [[package]] name = "tracing" -version = "0.1.23" +version = "0.1.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7d40a22fd029e33300d8d89a5cc8ffce18bb7c587662f54629e94c9de5487f3" +checksum = "01ebdc2bb4498ab1ab5f5b73c5803825e60199229ccba0698170e3be0e7f959f" dependencies = [ "cfg-if 1.0.0", "pin-project-lite", @@ -3556,9 +3537,9 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.12" +version = "0.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43f080ea7e4107844ef4766459426fa2d5c1ada2e47edba05dc7fa99d9629f47" +checksum = "c42e6fa53307c8a17e4ccd4dc81cf5ec38db9209f59b222210375b54ee40d1e2" dependencies = [ "proc-macro2", "quote", @@ -3576,11 +3557,11 @@ dependencies = [ [[package]] name = "tracing-futures" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab7bb6f14721aa00656086e9335d363c5c8747bae02ebe32ea2c7dece5689b4c" +checksum = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2" dependencies = [ - "pin-project 0.4.27", + "pin-project", "tracing", ] @@ -3608,9 +3589,9 @@ checksum = "a9b2228007eba4120145f785df0f6c92ea538f5a3635a612ecf4e334c8c1446d" [[package]] name = "typenum" -version = "1.12.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "373c8a200f9e67a0c95e62a4f52fbf80c23b4381c05a17845531982fa99e6b33" +checksum = "879f6906492a7cd215bfa4cf595b600146ccfac0c79bcbd1f3000162af5e8b06" [[package]] name = "ucd-trie" @@ -3626,9 +3607,9 @@ checksum = "eeba86d422ce181a719445e51872fa30f1f7413b62becb52e95ec91aa262d85c" [[package]] name = "unicode-bidi" -version = "0.3.4" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" +checksum = "eeb8be209bb1c96b7c177c7420d26e04eccacb0eeae6b980e35fcb74678107e0" dependencies = [ "matches", ] @@ -3678,9 +3659,9 @@ dependencies = [ [[package]] name = "url" -version = "2.2.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5909f2b0817350449ed73e8bcd81c8c3c8d9a7a5d8acba4b27db277f1868976e" +checksum = "9ccd964113622c8e9322cfac19eb1004a07e636c545f325da085d5cdde6f1f8b" dependencies = [ "form_urlencoded", "idna", @@ -3713,9 +3694,9 @@ checksum = "b00bca6106a5e23f3eee943593759b7fcddb00554332e856d990c893966879fb" [[package]] name = "vec-arena" -version = "1.0.0" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eafc1b9b2dfc6f5529177b62cf806484db55b32dc7c9658a118e11bbeb33061d" +checksum = "34b2f665b594b07095e3ac3f718e13c2197143416fae4c5706cffb7b1af8d7f1" [[package]] name = "vec_map" @@ -3731,9 +3712,9 @@ checksum = "d63556a25bae6ea31b52e640d7c41d1ab27faba4ccb600013837a3d0b3994ca1" [[package]] name = "version_check" -version = "0.9.2" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5a972e5669d67ba988ce3dc826706fb0a8b01471c088cb0b6110b805cc36aed" +checksum = "5fecdca9a5291cc2b8dcf7dc02453fee791a280f3743cb0905f8822ae463b3fe" [[package]] name = "void" @@ -3771,9 +3752,9 @@ checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" [[package]] name = "wasm-bindgen" -version = "0.2.70" +version = "0.2.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55c0f7123de74f0dab9b7d00fd614e7b19349cd1e2f5252bbe9b1754b59433be" +checksum = "83240549659d187488f91f33c0f8547cbfef0b2088bc470c116d1d260ef623d9" dependencies = [ "cfg-if 1.0.0", "serde", @@ -3783,9 +3764,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.70" +version = "0.2.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7bc45447f0d4573f3d65720f636bbcc3dd6ce920ed704670118650bcd47764c7" +checksum = "ae70622411ca953215ca6d06d3ebeb1e915f0f6613e3b495122878d7ebec7dae" dependencies = [ "bumpalo", "lazy_static", @@ -3798,9 +3779,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.20" +version = "0.4.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3de431a2910c86679c34283a33f66f4e4abd7e0aec27b6669060148872aadf94" +checksum = "81b8b767af23de6ac18bf2168b690bed2902743ddf0fb39252e36f9e2bfc63ea" dependencies = [ "cfg-if 1.0.0", "js-sys", @@ -3810,9 +3791,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.70" +version = "0.2.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b8853882eef39593ad4174dd26fc9865a64e84026d223f63bb2c42affcbba2c" +checksum = "3e734d91443f177bfdb41969de821e15c516931c3c3db3d318fa1b68975d0f6f" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -3820,9 +3801,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.70" +version = "0.2.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4133b5e7f2a531fa413b3a1695e925038a05a71cf67e87dafa295cb645a01385" +checksum = "d53739ff08c8a68b0fdbcd54c372b8ab800b1449ab3c9d706503bc7dd1621b2c" dependencies = [ "proc-macro2", "quote", @@ -3833,15 +3814,15 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.70" +version = "0.2.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd4945e4943ae02d15c13962b38a5b1e81eadd4b71214eee75af64a4d6a4fd64" +checksum = "d9a543ae66aa233d14bb765ed9af4a33e81b8b58d1584cf1b47ff8cd0b9e4489" [[package]] name = "web-sys" -version = "0.3.47" +version = "0.3.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c40dc691fc48003eba817c38da7113c15698142da971298003cac3ef175680b3" +checksum = "a905d57e488fec8861446d3393670fb50d27a262344013181c2cdf9fff5481be" dependencies = [ "js-sys", "wasm-bindgen", @@ -3856,6 +3837,12 @@ dependencies = [ "cc", ] +[[package]] +name = "wildmatch" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6c48bd20df7e4ced539c12f570f937c6b4884928a87fee70a479d72f031d4e0" + [[package]] name = "winapi" version = "0.3.9" @@ -3901,9 +3888,9 @@ dependencies = [ [[package]] name = "zbus" -version = "1.8.0" +version = "1.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40b4d4aa39daed4e32aed75f0c37b969184949a0fdfd5f2e1277abfda61f02a8" +checksum = "2326acc379a3ac4e34b794089f5bdb17086bf29a5fdf619b7b4cc772dc2e9dad" dependencies = [ "async-io", "byteorder", @@ -3924,11 +3911,11 @@ dependencies = [ [[package]] name = "zbus_macros" -version = "1.8.0" +version = "1.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc141cda72384bef359badf1808e391d3968f9299e8f3c3cbb78dafa1e0930" +checksum = "a482c56029e48681b89b92b5db3c446db0915e8dd1052c0328a574eda38d5f93" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 0.1.5", "proc-macro2", "quote", "syn", @@ -3957,9 +3944,9 @@ dependencies = [ [[package]] name = "zvariant" -version = "2.5.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fc67d552ac18ccd9e440f062f5b32c46776f96073122a8da2fe0c533833a213" +checksum = "678e7262502a135f49b1ece65010526649be7ee68acb80e1fc5377fc71fef878" dependencies = [ "byteorder", "enumflags2", @@ -3969,11 +3956,11 @@ dependencies = [ [[package]] name = "zvariant_derive" -version = "2.5.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eaee686340b5bff077d52423d8cc4f0f7cb323fe3f31ef676b8a3a2810bc53c5" +checksum = "27d7c34325a35020b94343389cc9391e0f8ac245cca9155429c4022d93141241" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 0.1.5", "proc-macro2", "quote", "syn", diff --git a/fractal-gtk/Cargo.toml b/fractal-gtk/Cargo.toml index 28640be3..b4dbec5b 100644 --- a/fractal-gtk/Cargo.toml +++ b/fractal-gtk/Cargo.toml @@ -79,5 +79,5 @@ features = ["serde"] [dependencies.matrix-sdk] git = "https://github.com/matrix-org/matrix-rust-sdk.git" -rev = "e437aea01213338d7f11787411a025b6133efcff" +rev = "ebcb2024d14614b8c984c5b95de5df04eec7933b" features = ["unstable-synapse-quirks", "socks"] diff --git a/fractal-gtk/src/appop/member.rs b/fractal-gtk/src/appop/member.rs index 1a6b3d35..4cf43491 100644 --- a/fractal-gtk/src/appop/member.rs +++ b/fractal-gtk/src/appop/member.rs @@ -12,7 +12,6 @@ use matrix_sdk::{ }, identifiers::{RoomId, UserId}, }; -use url::Url; #[derive(Debug, Clone, Copy)] pub enum SearchType { @@ -47,11 +46,7 @@ impl AppOp { } MembershipState::Join => { let m = Member { - avatar: ev - .content - .avatar_url - .and_then(|u| Url::parse(&u).ok()) - .map(Either::Left), + avatar: ev.content.avatar_url.map(Either::Left), alias: ev.content.displayname, uid: sender, }; diff --git a/fractal-gtk/src/appop/message.rs b/fractal-gtk/src/appop/message.rs index ebc3fbe5..f7823eac 100644 --- a/fractal-gtk/src/appop/message.rs +++ b/fractal-gtk/src/appop/message.rs @@ -616,7 +616,7 @@ async fn attach_file(session_client: MatrixClient, mut msg: Message) -> Result<( let thumb_url = extra_content.clone().and_then(|c| c.info.thumbnail_url); match (msg.url.clone(), msg.local_path.as_ref(), thumb_url) { - (Some(url), _, Some(thumb)) if url.scheme() == "mxc" && thumb.scheme() == "mxc" => { + (Some(_), _, Some(_)) => { send_msg_and_manage(session_client, msg).await; Ok(()) @@ -625,7 +625,7 @@ async fn attach_file(session_client: MatrixClient, mut msg: Message) -> Result<( if let Some(ref local_path_thumb) = msg.local_path_thumb { let response = room::upload_file(session_client.clone(), local_path_thumb) .await - .and_then(|response| Url::parse(&response.content_uri).map_err(Into::into)); + .map(|response| response.content_uri); match response { Ok(thumb_uri) => { @@ -648,7 +648,7 @@ async fn attach_file(session_client: MatrixClient, mut msg: Message) -> Result<( let query = room::upload_file(session_client.clone(), &local_path) .await .and_then(|response| { - msg.url = Some(Url::parse(&response.content_uri)?); + msg.url = Some(response.content_uri); RUNTIME.spawn(send_msg_and_manage(session_client, msg.clone())); Ok(msg) diff --git a/fractal-gtk/src/appop/room.rs b/fractal-gtk/src/appop/room.rs index ad3deb31..9bcb3b44 100644 --- a/fractal-gtk/src/appop/room.rs +++ b/fractal-gtk/src/appop/room.rs @@ -1,12 +1,11 @@ use crate::backend::room; use crate::util::i18n::{i18n, i18n_k, ni18n_f}; use log::{error, warn}; -use matrix_sdk::events::EventType; use matrix_sdk::identifiers::RoomId; +use matrix_sdk::{events::EventType, identifiers::MxcUri}; use std::convert::TryInto; use std::fs::remove_file; use std::os::unix::fs; -use url::Url; use gtk::prelude::*; @@ -442,7 +441,7 @@ impl AppOp { } } - pub fn set_room_avatar(&mut self, room_id: RoomId, avatar: Option) { + pub fn set_room_avatar(&mut self, room_id: RoomId, avatar: Option) { let login_data = unwrap_or_unit_return!(self.login_data.clone()); if avatar.is_none() { if let Ok(dest) = cache_dir_path(None, &room_id.to_string()) { diff --git a/fractal-gtk/src/backend/directory.rs b/fractal-gtk/src/backend/directory.rs index 0ea88a8d..385f0dbc 100644 --- a/fractal-gtk/src/backend/directory.rs +++ b/fractal-gtk/src/backend/directory.rs @@ -1,7 +1,7 @@ use matrix_sdk::identifiers::{Error as IdentifierError, ServerName}; use matrix_sdk::Client as MatrixClient; use matrix_sdk::Error as MatrixError; -use std::convert::{TryFrom, TryInto}; +use std::convert::TryFrom; use url::ParseError as UrlError; use crate::globals; @@ -112,8 +112,8 @@ pub async fn room_search( let rooms = response .chunk .into_iter() - .map(TryInto::try_into) - .collect::, UrlError>>()?; + .map(Into::into) + .collect::>(); for room in &rooms { if let Some(avatar) = room.avatar.as_ref() { diff --git a/fractal-gtk/src/backend/media.rs b/fractal-gtk/src/backend/media.rs index 785efe06..3a2dd017 100644 --- a/fractal-gtk/src/backend/media.rs +++ b/fractal-gtk/src/backend/media.rs @@ -1,10 +1,9 @@ use super::MediaError; use crate::globals; -use matrix_sdk::identifiers::{EventId, RoomId}; +use matrix_sdk::identifiers::{EventId, MxcUri, RoomId}; use matrix_sdk::{Client as MatrixClient, Error as MatrixError}; use std::convert::TryInto; use std::path::PathBuf; -use url::Url; use crate::model::message::Message; use matrix_sdk::api::r0::filter::{RoomEventFilter, UrlFilter}; @@ -16,7 +15,7 @@ use super::{dw_media, get_prev_batch_from, ContentType}; pub type MediaResult = Result; pub type MediaList = (Vec, String); -pub async fn get_thumb(session_client: MatrixClient, media: &Url) -> MediaResult { +pub async fn get_thumb(session_client: MatrixClient, media: &MxcUri) -> MediaResult { dw_media( session_client, media, @@ -26,7 +25,7 @@ pub async fn get_thumb(session_client: MatrixClient, media: &Url) -> MediaResult .await } -pub async fn get_media(session_client: MatrixClient, media: &Url) -> MediaResult { +pub async fn get_media(session_client: MatrixClient, media: &MxcUri) -> MediaResult { dw_media(session_client, media, ContentType::Download, None).await } @@ -74,7 +73,11 @@ async fn get_room_media_list( })), }); - let response = session_client.room_messages(request).await?; + let room = unwrap_or_notfound_return!( + session_client.get_room(room_id), + format!("Could not find room: {}", room_id) + ); + let response = room.messages(request).await?; let prev_batch = response.end.unwrap_or_default(); diff --git a/fractal-gtk/src/backend/mod.rs b/fractal-gtk/src/backend/mod.rs index 9733da67..74dc31f4 100644 --- a/fractal-gtk/src/backend/mod.rs +++ b/fractal-gtk/src/backend/mod.rs @@ -1,16 +1,14 @@ use lazy_static::lazy_static; use log::error; -use matrix_sdk::identifiers::{EventId, RoomId, ServerName}; +use matrix_sdk::identifiers::{Error as IdentifierError, EventId, MxcUri, RoomId}; use matrix_sdk::{ api::{error::ErrorKind as RumaErrorKind, Error as RumaClientError}, Client as MatrixClient, Error as MatrixError, FromHttpResponseError, HttpError, ServerError, }; use regex::Regex; -use std::convert::TryFrom; use std::fmt::Debug; use std::io::Error as IoError; use std::path::PathBuf; -use url::Url; use crate::client::Client; use crate::util::cache_dir_path; @@ -68,7 +66,6 @@ pub async fn get_prev_batch_from( #[derive(Debug)] pub enum MediaError { - MalformedMxcUrl, Io(IoError), Matrix(MatrixError), } @@ -89,38 +86,21 @@ impl HandleError for MediaError {} pub async fn dw_media( session_client: MatrixClient, - mxc: &Url, + mxc: &MxcUri, media_type: ContentType, dest: Option, ) -> Result { - if mxc.scheme() != "mxc" { - return Err(MediaError::MalformedMxcUrl); + if !mxc.is_valid() { + return Err(MatrixError::from(IdentifierError::InvalidMxcUri).into()); } - let server_name = mxc - .host() - .as_ref() - .map(ToString::to_string) - .and_then(|host| { - <&ServerName>::try_from(host.as_str()) - .map(ToOwned::to_owned) - .ok() - }) - .ok_or(MediaError::MalformedMxcUrl)?; - - let media_id = mxc - .path_segments() - .and_then(|mut ps| ps.next()) - .filter(|s| !s.is_empty()) - .ok_or(MediaError::MalformedMxcUrl)?; - let default_fname = || { let dir = if media_type.is_thumbnail() { "thumbs" } else { "medias" }; - cache_dir_path(Some(dir), &media_id) + cache_dir_path(Some(dir), mxc.media_id().unwrap()) }; let fname = dest.clone().map_or_else(default_fname, Ok)?; @@ -137,18 +117,17 @@ pub async fn dw_media( } let media = if let ContentType::Thumbnail(width, height) = media_type { - let request = assign!(GetContentThumbnailRequest::new( - &media_id, - &server_name, + let request = assign!(GetContentThumbnailRequest::from_url( + mxc, width.into(), height.into(), - ), { + ).unwrap(), { method: Some(Method::Crop), }); session_client.send(request, None).await?.file } else { - let request = GetContentRequest::new(&media_id, &server_name); + let request = GetContentRequest::from_url(mxc).unwrap(); session_client.send(request, None).await?.file }; diff --git a/fractal-gtk/src/backend/room.rs b/fractal-gtk/src/backend/room.rs index 4871768c..26834e7a 100644 --- a/fractal-gtk/src/backend/room.rs +++ b/fractal-gtk/src/backend/room.rs @@ -3,16 +3,15 @@ use serde_json::json; use matrix_sdk::{ api::error::ErrorKind as RumaErrorKind, - identifiers::{EventId, RoomId, RoomIdOrAliasId, UserId}, + identifiers::{EventId, MxcUri, RoomId, RoomIdOrAliasId, UserId}, Client as MatrixClient, Error as MatrixError, FromHttpResponseError, HttpError, ServerError, }; use serde::Serialize; use std::io::Error as IoError; use std::path::Path; -use url::{ParseError as UrlError, Url}; +use url::ParseError as UrlError; use std::convert::{TryFrom, TryInto}; -use std::time::Duration; use crate::globals; @@ -42,10 +41,9 @@ use matrix_sdk::api::r0::room::create_room::Request as CreateRoomRequest; use matrix_sdk::api::r0::room::create_room::RoomPreset; use matrix_sdk::api::r0::room::Visibility; use matrix_sdk::api::r0::state::get_state_events_for_key::Request as GetStateEventForKeyRequest; -use matrix_sdk::api::r0::state::send_state_event_for_key::Request as SendStateEventForKeyRequest; +use matrix_sdk::api::r0::state::send_state_event::Request as SendStateEventForKeyRequest; use matrix_sdk::api::r0::tag::create_tag::Request as CreateTagRequest; use matrix_sdk::api::r0::tag::delete_tag::Request as DeleteTagRequest; -use matrix_sdk::api::r0::typing::create_typing_event::Typing; use matrix_sdk::assign; use matrix_sdk::events::room::avatar::AvatarEventContent; use matrix_sdk::events::room::history_visibility::HistoryVisibility; @@ -154,7 +152,7 @@ impl HandleError for RoomAvatarError {} pub async fn get_room_avatar( session_client: MatrixClient, room_id: RoomId, -) -> Result<(RoomId, Option), RoomAvatarError> { +) -> Result<(RoomId, Option), RoomAvatarError> { let request = GetStateEventForKeyRequest::new(&room_id, EventType::RoomAvatar, ""); let response = match session_client.send(request, None).await { @@ -166,7 +164,7 @@ pub async fn get_room_avatar( let avatar = if let Some(res) = response { serde_json::to_value(&res.content)?["url"] .as_str() - .and_then(|s| Url::parse(s).ok()) + .and_then(|s| MxcUri::try_from(s).ok()) } else { None }; @@ -213,11 +211,7 @@ pub async fn get_room_members( let request = JoinedMembersRequest::new(&room_id); let response = session_client.send(request, None).await?; - let ms = response - .joined - .into_iter() - .map(Member::try_from) - .collect::>()?; + let ms = response.joined.into_iter().map(Into::into).collect(); Ok((room_id, ms)) } @@ -254,7 +248,11 @@ pub async fn get_room_messages( })), }); - let response = session_client.room_messages(request).await?; + let room = unwrap_or_notfound_return!( + session_client.get_room(&room_id), + format!("Could not find room: {}", room_id) + ); + let response = room.messages(request).await?; let prev_batch = response.end; let list: Vec = response @@ -365,9 +363,9 @@ pub async fn send_msg(session_client: MatrixClient, msg: Message) -> Result for SendTypingError { - fn from(err: MatrixError) -> Self { - Self(err) +impl> From for SendTypingError { + fn from(err: T) -> Self { + Self(err.into()) } } @@ -377,9 +375,11 @@ pub async fn send_typing( session_client: MatrixClient, room_id: &RoomId, ) -> Result<(), SendTypingError> { - session_client - .typing_notice(room_id, Typing::Yes(Duration::from_secs(4))) - .await?; + let room = unwrap_or_notfound_return!( + session_client.get_joined_room(room_id), + format!("Could not find room: {}", room_id) + ); + room.typing_notice(true).await?; Ok(()) } @@ -459,9 +459,9 @@ pub async fn join_room( #[derive(Debug)] pub struct LeaveRoomError(MatrixError); -impl From for LeaveRoomError { - fn from(err: MatrixError) -> Self { - Self(err) +impl> From for LeaveRoomError { + fn from(err: T) -> Self { + Self(err.into()) } } @@ -471,7 +471,11 @@ pub async fn leave_room( session_client: MatrixClient, room_id: &RoomId, ) -> Result<(), LeaveRoomError> { - session_client.leave_room(room_id).await?; + let room = unwrap_or_notfound_return!( + session_client.get_joined_room(room_id), + format!("Could not find room: {}", room_id) + ); + room.leave().await?; Ok(()) } @@ -479,9 +483,9 @@ pub async fn leave_room( #[derive(Debug)] pub struct MarkedAsReadError(MatrixError); -impl From for MarkedAsReadError { - fn from(err: MatrixError) -> Self { - Self(err) +impl> From for MarkedAsReadError { + fn from(err: T) -> Self { + Self(err.into()) } } @@ -492,9 +496,11 @@ pub async fn mark_as_read( room_id: RoomId, event_id: EventId, ) -> Result<(RoomId, EventId), MarkedAsReadError> { - session_client - .read_marker(&room_id, &event_id, Some(&event_id)) - .await?; + let room = unwrap_or_notfound_return!( + session_client.get_joined_room(&room_id), + format!("Could not find room: {}", room_id) + ); + room.read_marker(&event_id, Some(&event_id)).await?; Ok((room_id, event_id)) } @@ -841,9 +847,9 @@ pub async fn add_to_fav( #[derive(Debug)] pub struct InviteError(MatrixError); -impl From for InviteError { - fn from(err: MatrixError) -> Self { - Self(err) +impl> From for InviteError { + fn from(err: T) -> Self { + Self(err.into()) } } @@ -854,7 +860,11 @@ pub async fn invite( room_id: &RoomId, user_id: &UserId, ) -> Result<(), InviteError> { - session_client.invite_user_by_id(room_id, user_id).await?; + let room = unwrap_or_notfound_return!( + session_client.get_joined_room(room_id), + format!("Could not find room: {}", room_id) + ); + room.invite_user_by_id(user_id).await?; Ok(()) } diff --git a/fractal-gtk/src/backend/user.rs b/fractal-gtk/src/backend/user.rs index ae32d419..b90c29b6 100644 --- a/fractal-gtk/src/backend/user.rs +++ b/fractal-gtk/src/backend/user.rs @@ -11,7 +11,6 @@ use crate::appop::UserInfoCache; use crate::backend::HTTP_CLIENT; use crate::util::cache_dir_path; use log::error; -use std::convert::TryInto; use std::path::PathBuf; use super::room::AttachedFileError; @@ -496,12 +495,7 @@ pub async fn search( let request = UserDirectoryRequest::new(search_term); let response = session_client.send(request, None).await?; - response - .results - .into_iter() - .map(TryInto::try_into) - .collect::>() - .map_err(Into::into) + Ok(response.results.into_iter().map(Into::into).collect()) } #[derive(Debug)] @@ -538,16 +532,12 @@ pub async fn get_user_avatar( let request = GetProfileRequest::new(user_id); let response = session_client.send(request, None).await?; - let img = match response - .avatar_url - .map(|url| Url::parse(&url)) - .transpose()? - .map(|url| { - ( - url, - cache_dir_path(None, user_id.as_str()).map_err(MediaError::from), - ) - }) { + let img = match response.avatar_url.map(|url| { + ( + url, + cache_dir_path(None, user_id.as_str()).map_err(MediaError::from), + ) + }) { Some((url, Ok(dest))) => { dw_media( session_client, diff --git a/fractal-gtk/src/client.rs b/fractal-gtk/src/client.rs index 289086f6..a53bb2d7 100644 --- a/fractal-gtk/src/client.rs +++ b/fractal-gtk/src/client.rs @@ -5,13 +5,12 @@ use async_trait::async_trait; use gio::prelude::*; use matrix_sdk::{ reqwest, Client as MatrixClient, ClientConfig as MatrixClientConfig, Error as MatrixSdkError, - HttpError, HttpSend, + HttpError, HttpSend, RequestConfig, }; use url::Url; use std::convert::TryInto; use std::sync::{Arc, Mutex}; -use std::time::Duration; // Special URI used by gio to indicate no proxy const PROXY_DIRECT_URI: &str = "direct://"; @@ -133,9 +132,9 @@ impl HttpSend for Client { async fn send_request( &self, req: http::Request>, - duration: Option, + config: RequestConfig, ) -> Result>, HttpError> { - self.get_client().send_request(req, duration).await + self.get_client().send_request(req, config).await } } diff --git a/fractal-gtk/src/main.rs b/fractal-gtk/src/main.rs index 4da0513d..aa47df96 100644 --- a/fractal-gtk/src/main.rs +++ b/fractal-gtk/src/main.rs @@ -2,15 +2,15 @@ #[macro_use] extern crate glib; +#[macro_use] +mod util; mod api; mod backend; +mod cache; mod client; mod config; mod error; mod globals; -#[macro_use] -mod util; -mod cache; mod model; mod passwd; mod ui; diff --git a/fractal-gtk/src/model/fileinfo.rs b/fractal-gtk/src/model/fileinfo.rs index 613a8467..e06a767a 100644 --- a/fractal-gtk/src/model/fileinfo.rs +++ b/fractal-gtk/src/model/fileinfo.rs @@ -1,10 +1,10 @@ +use matrix_sdk::identifiers::MxcUri; use serde::{Deserialize, Serialize}; use serde_json::Value as JsonValue; -use url::Url; #[derive(Clone, Debug, Serialize, Deserialize)] pub struct Info { - pub thumbnail_url: Option, + pub thumbnail_url: Option, pub thumbnail_info: Option, pub w: Option, pub h: Option, diff --git a/fractal-gtk/src/model/member.rs b/fractal-gtk/src/model/member.rs index 617cbab6..c6aa28b9 100644 --- a/fractal-gtk/src/model/member.rs +++ b/fractal-gtk/src/model/member.rs @@ -1,17 +1,15 @@ use either::Either; -use matrix_sdk::api::r0::membership::joined_members::RoomMember; use matrix_sdk::api::r0::user_directory::search_users::User; use matrix_sdk::identifiers::UserId; +use matrix_sdk::{api::r0::membership::joined_members::RoomMember, identifiers::MxcUri}; use std::collections::HashMap; -use std::convert::TryFrom; use std::path::PathBuf; -use url::{ParseError as UrlError, Url}; #[derive(Debug, Clone)] pub struct Member { pub uid: UserId, pub alias: Option, - pub avatar: Option>, + pub avatar: Option>, } impl Member { @@ -31,37 +29,23 @@ impl PartialEq for Member { } } -impl TryFrom for Member { - type Error = UrlError; - - fn try_from(user: User) -> Result { - Ok(Self { +impl From for Member { + fn from(user: User) -> Self { + Self { uid: user.user_id, alias: user.display_name, - avatar: user - .avatar_url - .filter(|a| !a.is_empty()) - .map(|url| Url::parse(&url)) - .transpose()? - .map(Either::Left), - }) + avatar: user.avatar_url.map(Either::Left), + } } } -impl TryFrom<(UserId, RoomMember)> for Member { - type Error = UrlError; - - fn try_from((uid, roommember): (UserId, RoomMember)) -> Result { - Ok(Member { +impl From<(UserId, RoomMember)> for Member { + fn from((uid, roommember): (UserId, RoomMember)) -> Self { + Self { uid, alias: roommember.display_name, - avatar: roommember - .avatar_url - .filter(|url| !url.is_empty()) - .map(|url| Url::parse(&url)) - .transpose()? - .map(Either::Left), - }) + avatar: roommember.avatar_url.map(Either::Left), + } } } diff --git a/fractal-gtk/src/model/message.rs b/fractal-gtk/src/model/message.rs index b06e6468..42963a1f 100644 --- a/fractal-gtk/src/model/message.rs +++ b/fractal-gtk/src/model/message.rs @@ -2,19 +2,18 @@ use chrono::prelude::*; use chrono::DateTime; use matrix_sdk::{ events::{ - room::message::{MessageEventContent, RedactedMessageEventContent, Relation}, + room::message::{MessageEventContent, MessageType, RedactedMessageEventContent, Relation}, sticker::{RedactedStickerEventContent, StickerEventContent}, AnyMessageEvent, AnyRedactedMessageEvent, AnyRedactedSyncMessageEvent, AnyRoomEvent, AnySyncMessageEvent, AnySyncRoomEvent, EventContent, MessageEvent, RedactedMessageEvent, }, - identifiers::{EventId, RoomId, UserId}, + identifiers::{EventId, MxcUri, RoomId, UserId}, }; use serde_json::Value as JsonValue; use std::cmp::Ordering; use std::collections::HashMap; use std::convert::TryFrom; use std::path::PathBuf; -use url::Url; //FIXME make properties private #[derive(Debug, Clone)] @@ -24,9 +23,9 @@ pub struct Message { pub body: String, pub date: DateTime, pub room: RoomId, - pub thumb: Option, + pub thumb: Option, pub local_path_thumb: Option, - pub url: Option, + pub url: Option, pub local_path: Option, // FIXME: This should be a required field but it is mandatory // to do it this way because because this struct is used both @@ -105,71 +104,68 @@ impl From> for Message { extra_content: None, }; - match msg.content { - MessageEventContent::Audio(content) => Self { + match msg.content.msgtype { + MessageType::Audio(content) => Self { mtype: String::from("m.audio"), body: content.body, - url: content.url.and_then(|u| Url::parse(&u).ok()), + url: content.url, ..initial_message }, - MessageEventContent::File(content) => { - let url = content.url.and_then(|u| Url::parse(&u).ok()); - Self { - mtype: String::from("m.file"), - body: content.body, - url: url.clone(), - thumb: content - .info - .and_then(|c_info| Url::parse(&c_info.thumbnail_url?).ok()) - .or(url), - ..initial_message - } - } - MessageEventContent::Image(content) => { - let url = content.url.and_then(|u| Url::parse(&u).ok()); - Self { - mtype: String::from("m.image"), - body: content.body, - url: url.clone(), - thumb: content - .info - .and_then(|c_info| Url::parse(&c_info.thumbnail_url?).ok()) - .or(url), - ..initial_message - } - } - MessageEventContent::Video(content) => { - let url = content.url.and_then(|u| Url::parse(&u).ok()); - Self { - mtype: String::from("m.video"), - body: content.body, - url: url.clone(), - thumb: content - .info - .and_then(|c_info| Url::parse(&c_info.thumbnail_url?).ok()) - .or(url), - ..initial_message - } - } - MessageEventContent::Text(content) => { + MessageType::File(content) => Self { + mtype: String::from("m.file"), + body: content.body, + url: content.url.clone(), + thumb: content + .info + .map(|i| i.thumbnail_url.filter(|u| u.is_valid())) + .flatten() + .or(content.url), + ..initial_message + }, + MessageType::Image(content) => Self { + mtype: String::from("m.image"), + body: content.body, + url: content.url.clone(), + thumb: content + .info + .map(|i| i.thumbnail_url.filter(|u| u.is_valid())) + .flatten() + .or(content.url), + ..initial_message + }, + MessageType::Video(content) => Self { + mtype: String::from("m.video"), + body: content.body, + url: content.url.clone(), + thumb: content + .info + .map(|i| i.thumbnail_url.filter(|u| u.is_valid())) + .flatten() + .or(content.url), + ..initial_message + }, + MessageType::Text(content) => { let (in_reply_to, replace) = - content.relates_to.map_or(Default::default(), |r| match r { - Relation::Replacement(rep) => (None, Some(rep.event_id)), - Relation::Reply { in_reply_to } => (Some(in_reply_to.event_id), None), - _ => (None, None), - }); - let (body, formatted, in_reply_to) = content + msg.content + .relates_to + .map_or(Default::default(), |r| match r { + Relation::Replacement(rep) => (None, Some(rep.event_id)), + Relation::Reply { in_reply_to } => (Some(in_reply_to.event_id), None), + _ => (None, None), + }); + let (body, formatted, in_reply_to) = msg + .content .new_content .and_then(|nc| { // FIXME: this could go wrong if a text message wasn't replaced with a text // message. - if let MessageEventContent::Text(nc) = *nc { + if let MessageType::Text(c) = nc.msgtype { let in_reply_to = nc.relates_to.and_then(|r| match r { Relation::Reply { in_reply_to } => Some(in_reply_to.event_id), _ => None, }); - Some((nc.body, nc.formatted, in_reply_to)) + Some((c.body, c.formatted, in_reply_to)) } else { None } @@ -189,7 +185,7 @@ impl From> for Message { ..initial_message } } - MessageEventContent::Emote(content) => { + MessageType::Emote(content) => { let (formatted_body, format): (Option, Option) = content.formatted.map_or((None, None), |f| { (Some(f.body), Some(f.format.as_str().into())) @@ -202,30 +198,33 @@ impl From> for Message { ..initial_message } } - MessageEventContent::Location(content) => Self { + MessageType::Location(content) => Self { mtype: String::from("m.location"), body: content.body, ..initial_message }, - MessageEventContent::Notice(content) => { + MessageType::Notice(content) => { let (in_reply_to, replace) = - content.relates_to.map_or(Default::default(), |r| match r { - Relation::Replacement(rep) => (None, Some(rep.event_id)), - Relation::Reply { in_reply_to } => (Some(in_reply_to.event_id), None), - _ => (None, None), - }); - let (body, formatted, in_reply_to) = content + msg.content + .relates_to + .map_or(Default::default(), |r| match r { + Relation::Replacement(rep) => (None, Some(rep.event_id)), + Relation::Reply { in_reply_to } => (Some(in_reply_to.event_id), None), + _ => (None, None), + }); + let (body, formatted, in_reply_to) = msg + .content .new_content .and_then(|nc| { // FIXME: this could go wrong if a notice message wasn't replaced with a // notice message. - if let MessageEventContent::Notice(nc) = *nc { + if let MessageType::Notice(c) = nc.msgtype { let in_reply_to = nc.relates_to.and_then(|r| match r { Relation::Reply { in_reply_to } => Some(in_reply_to.event_id), _ => None, }); - Some((nc.body, nc.formatted, in_reply_to)) + Some((c.body, c.formatted, in_reply_to)) } else { None } @@ -245,7 +244,7 @@ impl From> for Message { ..initial_message } } - MessageEventContent::ServerNotice(content) => Self { + MessageType::ServerNotice(content) => Self { mtype: String::from("m.server_notice"), body: content.body, ..initial_message @@ -287,7 +286,6 @@ impl From> for Message { impl From> for Message { fn from(msg: MessageEvent) -> Self { let source = serde_json::to_string_pretty(&msg).ok(); - let url = Url::parse(&msg.content.url).ok(); Self { sender: msg.sender, @@ -298,14 +296,14 @@ impl From> for Message { id: Some(msg.event_id), mtype: String::from(msg.content.event_type()), body: msg.content.body, - url: url.clone(), + url: Some(msg.content.url.clone()), local_path: None, thumb: msg .content .info .thumbnail_url - .and_then(|thumb| Url::parse(&thumb).ok()) - .or(url), + .filter(|u| u.is_valid()) + .or(Some(msg.content.url)), local_path_thumb: None, formatted_body: None, format: None, diff --git a/fractal-gtk/src/model/room.rs b/fractal-gtk/src/model/room.rs index 7a508541..a07f680a 100644 --- a/fractal-gtk/src/model/room.rs +++ b/fractal-gtk/src/model/room.rs @@ -7,7 +7,6 @@ use chrono::DateTime; use chrono::Utc; use either::Either; use log::{debug, info}; -use matrix_sdk::deserialized_responses::SyncResponse; use matrix_sdk::directory::PublicRoomsChunk; use matrix_sdk::events::{ room::member::{MemberEventContent, MembershipState}, @@ -15,11 +14,11 @@ use matrix_sdk::events::{ AnySyncEphemeralRoomEvent, AnySyncRoomEvent, AnySyncStateEvent, SyncStateEvent, }; use matrix_sdk::identifiers::{EventId, RoomAliasId, RoomId, UserId}; +use matrix_sdk::{deserialized_responses::SyncResponse, identifiers::MxcUri}; use serde::{Deserialize, Serialize}; use serde_json::value::Value; use std::collections::{BTreeMap, HashMap, HashSet}; use std::convert::{TryFrom, TryInto}; -use url::{ParseError as UrlError, Url}; #[derive(Debug, Clone, PartialEq)] pub enum RoomMembership { @@ -114,7 +113,7 @@ struct CustomDirectEvent { #[derive(Debug, Clone)] pub struct Room { pub id: RoomId, - pub avatar: Option, + pub avatar: Option, pub name: Option, pub topic: Option, pub alias: Option, @@ -227,12 +226,10 @@ impl Room { avatar: stevents .iter() .find_map(|event| match event { - AnySyncStateEvent::RoomAvatar(ev) => Some(ev.content.url.as_deref()), + AnySyncStateEvent::RoomAvatar(ev) => Some(ev.content.url.clone()), _ => None, }) - .flatten() - .map(Url::parse) - .and_then(Result::ok), + .flatten(), alias: stevents .iter() .find_map(|event| match event { @@ -280,7 +277,11 @@ impl Room { AnyBasicEvent::Custom(ev) if ev.content.event_type == "org.gnome.fractal.language" => { - ev.content.json["input_language"].as_str() + ev.content + .data + .get("input_language") + .map(|v| v.as_str()) + .flatten() } _ => None, }) @@ -360,7 +361,7 @@ impl Room { let kicker = message.sender().clone(); if kicker != user_id { if let AnyMessageEventContent::Custom(message) = message.content() { - if let Value::String(kick_reason) = &message.json["reason"] { + if let Some(Value::String(kick_reason)) = &message.data.get("reason") { let reason = Reason::Kicked(kick_reason.clone(), kicker); return Self::new(k.clone(), RoomMembership::Left(reason)); } @@ -416,14 +417,10 @@ impl Room { avatar: stevents .iter() .find_map(|event| match event { - AnyStrippedStateEvent::RoomAvatar(ev) => { - Some(ev.content.url.as_deref()) - } + AnyStrippedStateEvent::RoomAvatar(ev) => Some(ev.content.url.clone()), _ => None, }) - .flatten() - .map(Url::parse) - .and_then(Result::ok), + .flatten(), alias: stevents .iter() .find_map(|event| match event { @@ -457,24 +454,18 @@ impl Room { } } -impl TryFrom for Room { - type Error = UrlError; - - fn try_from(input: PublicRoomsChunk) -> Result { - Ok(Self { +impl From for Room { + fn from(input: PublicRoomsChunk) -> Self { + Self { alias: input.canonical_alias, name: input.name, - avatar: input - .avatar_url - .filter(|url| !url.is_empty()) - .map(|url| Url::parse(&url)) - .transpose()?, + avatar: input.avatar_url, topic: input.topic, n_members: input.num_joined_members.into(), world_readable: input.world_readable, guest_can_join: input.guest_can_join, ..Self::new(input.room_id, RoomMembership::None) - }) + } } } @@ -526,14 +517,7 @@ fn parse_room_member(msg: &SyncStateEvent) -> Option Some(Member { uid: msg.sender.clone(), alias: msg.content.displayname.clone(), - avatar: msg - .content - .avatar_url - .as_ref() - .map(String::as_str) - .map(Url::parse) - .and_then(Result::ok) - .map(Either::Left), + avatar: msg.content.avatar_url.clone().map(Either::Left), }) } else { None diff --git a/fractal-gtk/src/ui/account.rs b/fractal-gtk/src/ui/account.rs index 31286297..f1cf63ec 100644 --- a/fractal-gtk/src/ui/account.rs +++ b/fractal-gtk/src/ui/account.rs @@ -280,7 +280,7 @@ impl AccountSettings { 1, ); } - Medium::MSISDN => { + Medium::Msisdn => { let s = if first_phone { empty_phone.update(Some(item.address)); first_phone = false; diff --git a/fractal-gtk/src/util/mod.rs b/fractal-gtk/src/util/mod.rs index 05dfdf57..eee28501 100644 --- a/fractal-gtk/src/util/mod.rs +++ b/fractal-gtk/src/util/mod.rs @@ -81,6 +81,15 @@ macro_rules! unwrap_or_unit_return { }; } +macro_rules! unwrap_or_notfound_return { + ($x:expr, $msg:expr) => { + match $x { + Some(a) => a, + None => return Err(::std::io::Error::new(::std::io::ErrorKind::NotFound, $msg).into()), + } + }; +} + pub trait ResultExpectLog { fn expect_log(&self, log: &str); } diff --git a/fractal-gtk/src/widgets/image.rs b/fractal-gtk/src/widgets/image.rs index c7b0be51..08c52893 100644 --- a/fractal-gtk/src/widgets/image.rs +++ b/fractal-gtk/src/widgets/image.rs @@ -11,14 +11,13 @@ use glib::source::Continue; use gtk::prelude::*; use gtk::DrawingArea; use log::error; -use matrix_sdk::Client as MatrixClient; +use matrix_sdk::{identifiers::MxcUri, Client as MatrixClient}; use std::path::{Path, PathBuf}; use std::sync::{Arc, Mutex}; -use url::Url; #[derive(Clone, Debug)] pub struct Image { - pub path: Either, + pub path: Either, pub local_path: Arc>>, pub max_size: Option<(i32, i32)>, pub widget: DrawingArea, @@ -45,7 +44,7 @@ impl Image { /// .size(Some((50, 50))) /// .build(); /// ``` - pub fn new(path: Either) -> Image { + pub fn new(path: Either) -> Image { let da = DrawingArea::new(); da.add_events(gdk::EventMask::ENTER_NOTIFY_MASK); da.add_events(gdk::EventMask::LEAVE_NOTIFY_MASK); @@ -266,8 +265,8 @@ impl Image { /// in the `image` widget scaled to size pub fn load_async(&self, session_client: MatrixClient) { match self.path.as_ref() { - Either::Left(url) if url.scheme() == "mxc" => { - let mxc = url.clone(); + Either::Left(mxc) => { + let mxc = mxc.clone(); // asyn load let response = if self.thumb { RUNTIME.spawn(async move { media::get_thumb(session_client, &mxc).await }) @@ -302,7 +301,6 @@ impl Image { &path, ); } - _ => error!("The resource URL doesn't have the scheme mxc:"), } } } diff --git a/fractal-gtk/src/widgets/inline_player.rs b/fractal-gtk/src/widgets/inline_player.rs index 1d5594c2..d189d192 100644 --- a/fractal-gtk/src/widgets/inline_player.rs +++ b/fractal-gtk/src/widgets/inline_player.rs @@ -40,7 +40,7 @@ use std::ops::Deref; use std::path::PathBuf; use std::rc::Rc; -use matrix_sdk::Client as MatrixClient; +use matrix_sdk::{identifiers::MxcUri, Client as MatrixClient}; use url::Url; use crate::app::RUNTIME; @@ -53,7 +53,7 @@ pub trait PlayerExt { fn initialize_stream( player: Rc, session_client: MatrixClient, - media_url: Url, + media_url: MxcUri, bx: gtk::Box, start_playing: bool, ); @@ -499,7 +499,7 @@ impl PlayerExt for T { fn initialize_stream( player: Rc, session_client: MatrixClient, - media_url: Url, + media_url: MxcUri, bx: gtk::Box, start_playing: bool, ) { diff --git a/fractal-gtk/src/widgets/media_viewer.rs b/fractal-gtk/src/widgets/media_viewer.rs index f697e93c..2a81c94e 100644 --- a/fractal-gtk/src/widgets/media_viewer.rs +++ b/fractal-gtk/src/widgets/media_viewer.rs @@ -15,9 +15,8 @@ use glib::source::Continue; use gtk::prelude::*; use gtk::Overlay; use libhandy::HeaderBarExt; -use matrix_sdk::identifiers::UserId; +use matrix_sdk::identifiers::{MxcUri, UserId}; use matrix_sdk::Client as MatrixClient; -use url::Url; use crate::model::{message::Message, room::Room}; @@ -343,7 +342,7 @@ impl Data { self.set_nav_btn_visibility(); } - fn create_video_widget(&self, session_client: MatrixClient, url: Url) -> VideoWidget { + fn create_video_widget(&self, session_client: MatrixClient, url: MxcUri) -> VideoWidget { let with_controls = true; let player = VideoPlayerWidget::new(with_controls); let bx = gtk::Box::new(gtk::Orientation::Vertical, 0); diff --git a/fractal-gtk/src/widgets/message.rs b/fractal-gtk/src/widgets/message.rs index f3429a75..de314a10 100644 --- a/fractal-gtk/src/widgets/message.rs +++ b/fractal-gtk/src/widgets/message.rs @@ -696,7 +696,6 @@ fn build_room_msg_image(session_client: MatrixClient, msg: &Message) -> BodyAndT .msg .thumb .clone() - .filter(|m| m.scheme() == "mxc" || m.scheme().starts_with("http")) .or_else(|| msg.msg.url.clone()) .map(Either::Left) .or_else(|| Some(Either::Right(msg.msg.local_path.clone()?))); diff --git a/fractal-gtk/src/widgets/roomlist.rs b/fractal-gtk/src/widgets/roomlist.rs index 42b5a4f0..96769181 100644 --- a/fractal-gtk/src/widgets/roomlist.rs +++ b/fractal-gtk/src/widgets/roomlist.rs @@ -1,6 +1,6 @@ use crate::util::i18n::i18n; use glib::clone; -use matrix_sdk::identifiers::RoomId; +use matrix_sdk::identifiers::{MxcUri, RoomId}; use gtk::prelude::*; use log::info; @@ -225,7 +225,7 @@ impl RoomListGroup { }); } - pub fn set_room_avatar(&mut self, room_id: RoomId, av: Option) { + pub fn set_room_avatar(&mut self, room_id: RoomId, av: Option) { if let Some(r) = self.rooms.get_mut(&room_id) { r.set_avatar(av.clone()); } @@ -635,7 +635,7 @@ impl RoomList { }); } - pub fn set_room_avatar(&mut self, room_id: RoomId, av: Option) { + pub fn set_room_avatar(&mut self, room_id: RoomId, av: Option) { run_in_group!(self, &room_id, set_room_avatar, room_id, av); } diff --git a/fractal-gtk/src/widgets/roomrow.rs b/fractal-gtk/src/widgets/roomrow.rs index 5136fc07..b897661d 100644 --- a/fractal-gtk/src/widgets/roomrow.rs +++ b/fractal-gtk/src/widgets/roomrow.rs @@ -1,5 +1,5 @@ use gtk::prelude::*; -use url::Url; +use matrix_sdk::identifiers::MxcUri; use crate::model::room::Room; @@ -117,7 +117,7 @@ impl RoomRow { self.text.set_text(&name); } - pub fn set_avatar(&mut self, avatar: Option) { + pub fn set_avatar(&mut self, avatar: Option) { self.room.avatar = avatar; let name = self.room.name.clone().unwrap_or_else(|| "...".to_string());