From d8b8f23bb95745e2f0b3cfe4ba1b18a7a53ce0c3 Mon Sep 17 00:00:00 2001 From: Stu Black Date: Sun, 8 Dec 2024 22:11:34 -0500 Subject: [PATCH 1/5] Bump matrix-sdk dependency to 0.8. This accommodates recent protocol changes and addresses #378. --- Cargo.lock | 857 +++++++++++++++++++++++---------------- Cargo.toml | 2 +- src/message/mod.rs | 4 +- src/notifications.rs | 44 +- src/preview.rs | 4 +- src/windows/room/chat.rs | 4 +- src/windows/room/mod.rs | 4 +- src/worker.rs | 39 +- 8 files changed, 576 insertions(+), 382 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 572c39a..cfe0c59 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -11,7 +11,7 @@ dependencies = [ "macroific", "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.90", ] [[package]] @@ -161,16 +161,16 @@ checksum = "d301b3b94cb4b2f23d7917810addbbaff90738e0ca2be692bd027e70d7e0330c" [[package]] name = "aquamarine" -version = "0.5.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21cc1548309245035eb18aa7f0967da6bc65587005170c56e6ef2788a4cf3f4e" +checksum = "0f50776554130342de4836ba542aa85a4ddb361690d7e8df13774d7284c3d5c2" dependencies = [ "include_dir", "itertools 0.10.5", - "proc-macro-error", + "proc-macro-error2", "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.90", ] [[package]] @@ -350,7 +350,7 @@ checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.90", ] [[package]] @@ -390,7 +390,7 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.90", ] [[package]] @@ -407,7 +407,7 @@ checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673ff8ca0349a028107" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.90", ] [[package]] @@ -422,6 +422,61 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" +[[package]] +name = "axum" +version = "0.7.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edca88bc138befd0323b20752846e6587272d3b03b0343c8ea28a6f819e6e71f" +dependencies = [ + "async-trait", + "axum-core", + "bytes", + "futures-util", + "http", + "http-body", + "http-body-util", + "hyper", + "hyper-util", + "itoa", + "matchit", + "memchr", + "mime", + "percent-encoding", + "pin-project-lite", + "rustversion", + "serde", + "serde_json", + "serde_path_to_error", + "serde_urlencoded", + "sync_wrapper 1.0.2", + "tokio", + "tower 0.5.1", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "axum-core" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09f2bd6146b97ae3359fa0cc6d6b376d9539582c7b4220f041a33ec24c226199" +dependencies = [ + "async-trait", + "bytes", + "futures-util", + "http", + "http-body", + "http-body-util", + "mime", + "pin-project-lite", + "rustversion", + "sync_wrapper 1.0.2", + "tower-layer", + "tower-service", + "tracing", +] + [[package]] name = "backoff" version = "0.4.0" @@ -486,6 +541,9 @@ name = "bitflags" version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" +dependencies = [ + "serde", +] [[package]] name = "bitmaps" @@ -637,22 +695,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] -name = "cfg-vis" -version = "0.3.0" +name = "cfg_aliases" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3a2c3bf5fc10fe2ca157564fbe08a4cb2b0a7d2ff3fe2f9683e65d5e7c7859c" -dependencies = [ - "proc-macro-crate 1.3.1", - "proc-macro2", - "quote", - "syn 1.0.109", -] +checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" [[package]] name = "cfg_aliases" -version = "0.1.1" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" +checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" [[package]] name = "chacha20" @@ -735,7 +787,7 @@ dependencies = [ "heck 0.4.1", "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.90", ] [[package]] @@ -1005,7 +1057,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.90", ] [[package]] @@ -1043,13 +1095,18 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "date_header" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c03c416ed1a30fbb027ef484ba6ab6f80e1eada675e1a2b92fd673c045a1f1d" + [[package]] name = "deadpool" -version = "0.10.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb84100978c1c7b37f09ed3ce3e5f843af02c2a2c431bae5b19230dad2c1b490" +checksum = "6541a3916932fe57768d4be0b1ffb5ec7cbf74ca8c903fdfd5c0fe8aa958f0ed" dependencies = [ - "async-trait", "deadpool-runtime", "num_cpus", "tokio", @@ -1066,9 +1123,9 @@ dependencies = [ [[package]] name = "deadpool-sqlite" -version = "0.7.0" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8010e36e12f3be22543a5e478b4af20aeead9a700dd69581a5e050a070fc22c" +checksum = "2f9cc6210316f8b7ced394e2a5d2833ce7097fb28afb5881299c61bc18e8e0e9" dependencies = [ "deadpool", "deadpool-sync", @@ -1084,6 +1141,17 @@ dependencies = [ "deadpool-runtime", ] +[[package]] +name = "decancer" +version = "3.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a41401dd84c9335e2f5aec7f64057e243585d62622260d41c245919a601ccc9" +dependencies = [ + "lazy_static 1.5.0", + "paste", + "regex", +] + [[package]] name = "delegate-display" version = "2.1.1" @@ -1093,7 +1161,7 @@ dependencies = [ "macroific", "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.90", ] [[package]] @@ -1103,22 +1171,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f55bf8e7b65898637379c1b74eb1551107c8294ed26d855ceb9fd1a09cfc9bc0" dependencies = [ "const-oid", - "der_derive", - "flagset", "zeroize", ] -[[package]] -name = "der_derive" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8034092389675178f570469e6c3b0465d3d30b4505c294a6550db47f3c17ad18" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.76", -] - [[package]] name = "deranged" version = "0.3.11" @@ -1147,7 +1202,7 @@ checksum = "d150dea618e920167e5973d70ae6ece4385b7164e0d799fe7c122dd0a5d912ad" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.90", ] [[package]] @@ -1191,7 +1246,7 @@ dependencies = [ "proc-macro2", "quote", "rustc_version", - "syn 2.0.76", + "syn 2.0.90", ] [[package]] @@ -1258,17 +1313,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "displaydoc" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.76", -] - [[package]] name = "dlib" version = "0.5.2" @@ -1341,15 +1385,6 @@ dependencies = [ "phf 0.11.2", ] -[[package]] -name = "encoding_rs" -version = "0.8.34" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" -dependencies = [ - "cfg-if", -] - [[package]] name = "endian-type" version = "0.1.2" @@ -1380,7 +1415,7 @@ checksum = "de0d48a183585823424a4ce1aa132d174a6a81bd540895822eb4c8373a8e49e8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.90", ] [[package]] @@ -1422,17 +1457,6 @@ dependencies = [ "pin-project-lite", ] -[[package]] -name = "event-listener" -version = "4.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67b215c49b2b248c855fb73579eb1f4f26c38ffdc12973e20e07b91d78d5646e" -dependencies = [ - "concurrent-queue", - "parking", - "pin-project-lite", -] - [[package]] name = "event-listener" version = "5.3.1" @@ -1483,14 +1507,13 @@ dependencies = [ [[package]] name = "eyeball-im" -version = "0.4.3" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9326c8d9f6d59d18935412608b4514cc661e4e068011bb2f523f6c8b1cfa3bd4" +checksum = "a1c02432230060cae0621e15803e073976d22974e0f013c9cb28a4ea1b484629" dependencies = [ "futures-core", "imbl", "tokio", - "tokio-util", "tracing", ] @@ -1515,7 +1538,7 @@ dependencies = [ "macroific", "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.90", ] [[package]] @@ -1554,12 +1577,6 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" -[[package]] -name = "flagset" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3ea1ec5f8307826a5b71094dd91fc04d4ae75d5709b20ad351c7fb4815c86ec" - [[package]] name = "flate2" version = "1.0.33" @@ -1612,7 +1629,7 @@ checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.90", ] [[package]] @@ -1740,7 +1757,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.90", ] [[package]] @@ -1857,22 +1874,15 @@ dependencies = [ ] [[package]] -name = "h2" -version = "0.3.26" +name = "growable-bloom-filter" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" +checksum = "d174ccb4ba660d431329e7f0797870d0a4281e36353ec4b4a3c5eab6c2cfb6f1" dependencies = [ - "bytes", - "fnv", - "futures-core", - "futures-sink", - "futures-util", - "http", - "indexmap", - "slab", - "tokio", - "tokio-util", - "tracing", + "serde", + "serde_bytes", + "serde_derive", + "xxhash-rust", ] [[package]] @@ -1897,9 +1907,9 @@ dependencies = [ [[package]] name = "hashlink" -version = "0.8.4" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8094feaf31ff591f651a2664fb9cfd92bba7a60ce3197265e9482ebe753c8f7" +checksum = "6ba4ff7128dee98c7dc9794b6a411377e1404dba1c97deb8d1a55297bd25d8af" dependencies = [ "hashbrown", ] @@ -1977,9 +1987,9 @@ dependencies = [ [[package]] name = "http" -version = "0.2.12" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" +checksum = "f16ca2af56261c99fba8bac40a10251ce8188205a4c448fbb745a2e4daa76fea" dependencies = [ "bytes", "fnv", @@ -1988,12 +1998,24 @@ dependencies = [ [[package]] name = "http-body" -version = "0.4.6" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" dependencies = [ "bytes", "http", +] + +[[package]] +name = "http-body-util" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" +dependencies = [ + "bytes", + "futures-util", + "http", + "http-body", "pin-project-lite", ] @@ -2020,53 +2042,75 @@ dependencies = [ [[package]] name = "hyper" -version = "0.14.30" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a152ddd61dfaec7273fe8419ab357f33aee0d914c5f4efbf0d96fa749eea5ec9" +checksum = "97818827ef4f364230e16705d4706e2897df2bb60617d6ca15d598025a3c481f" dependencies = [ "bytes", "futures-channel", - "futures-core", "futures-util", - "h2", "http", "http-body", "httparse", "httpdate", "itoa", "pin-project-lite", - "socket2 0.5.7", + "smallvec", "tokio", - "tower-service", - "tracing", "want", ] [[package]] name = "hyper-rustls" -version = "0.24.2" +version = "0.27.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" +checksum = "08afdbb5c31130e3034af566421053ab03787c640246a446327f550d11bcb333" dependencies = [ "futures-util", "http", "hyper", + "hyper-util", "rustls", + "rustls-pki-types", "tokio", "tokio-rustls", + "tower-service", + "webpki-roots", ] [[package]] name = "hyper-tls" -version = "0.5.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" +checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" dependencies = [ "bytes", + "http-body-util", "hyper", + "hyper-util", "native-tls", "tokio", "tokio-native-tls", + "tower-service", +] + +[[package]] +name = "hyper-util" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "http", + "http-body", + "hyper", + "pin-project-lite", + "socket2 0.5.7", + "tokio", + "tower-service", + "tracing", ] [[package]] @@ -2108,7 +2152,7 @@ dependencies = [ "serde_json", "sled", "temp-dir", - "thiserror", + "thiserror 1.0.63", "tokio", "toml", "tracing", @@ -2198,9 +2242,9 @@ dependencies = [ [[package]] name = "imbl" -version = "2.0.3" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "978d142c8028edf52095703af2fad11d6f611af1246685725d6b850634647085" +checksum = "bc3be8d8cd36f33a46b1849f31f837c44d9fa87223baee3b4bd96b8f11df81eb" dependencies = [ "bitmaps", "imbl-sized-chunks", @@ -2240,9 +2284,9 @@ dependencies = [ [[package]] name = "indexed_db_futures" -version = "0.4.2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0704b71f13f81b5933d791abf2de26b33c40935143985220299a357721166706" +checksum = "43315957678a70eb21fb0d2384fe86dde0d6c859a01e24ce127eb65a0143d28c" dependencies = [ "accessory", "cfg-if", @@ -2283,9 +2327,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" dependencies = [ "cfg-if", - "js-sys", - "wasm-bindgen", - "web-sys", ] [[package]] @@ -2477,9 +2518,9 @@ dependencies = [ [[package]] name = "libsqlite3-sys" -version = "0.27.0" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf4e226dcd58b4be396f7bd3c20da8fdee2911400705297ba7d2d7cc2c30f716" +checksum = "0c10584274047cb335c23d3e61bcef8e323adae7c5c8c760540f73610177fc3f" dependencies = [ "cc", "pkg-config", @@ -2562,7 +2603,7 @@ dependencies = [ "cfg-if", "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.90", ] [[package]] @@ -2573,7 +2614,7 @@ checksum = "13198c120864097a565ccb3ff947672d969932b7975ebd4085732c9f09435e55" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.90", ] [[package]] @@ -2586,7 +2627,7 @@ dependencies = [ "macroific_core", "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.90", ] [[package]] @@ -2630,34 +2671,40 @@ dependencies = [ "xml5ever", ] +[[package]] +name = "matchit" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" + [[package]] name = "matrix-pickle" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7eb521190328c57a2051f70250beb874dc0fac6bcd22b615f7f9700b7b4fb826" +checksum = "4e2551de3bba2cc65b52dc6b268df6114011fe118ac24870fbcf1b35537bd721" dependencies = [ "matrix-pickle-derive", - "thiserror", + "thiserror 1.0.63", ] [[package]] name = "matrix-pickle-derive" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6fb3c7231cbb7fbbc50871615edebf65183b382cdaa1fe21c5e88a12617de8e" +checksum = "f75de44c3120d78e978adbcf6d453b20ba011f3c46363e52d1dbbc72f545e9fb" dependencies = [ "proc-macro-crate 3.2.0", - "proc-macro-error", + "proc-macro-error2", "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.90", ] [[package]] name = "matrix-sdk" -version = "0.7.1" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "336687e5fc8b33661a31681e988a67e9a3090c7fb1a8323a7f71eeaabad642ec" +checksum = "e5e2b229a3076e8b36ca3508e79efb6892a4ea841699504ff74fb59910c7d2d0" dependencies = [ "anymap2", "aquamarine", @@ -2665,26 +2712,28 @@ dependencies = [ "async-channel", "async-stream", "async-trait", + "axum", "backoff", "bytes", "bytesize", - "cfg-vis", - "event-listener 4.0.3", + "event-listener 5.3.1", "eyeball", "eyeball-im", "futures-core", "futures-util", "gloo-timers", + "growable-bloom-filter", "http", - "hyper", "imbl", "indexmap", + "js_int", "matrix-sdk-base", "matrix-sdk-common", "matrix-sdk-indexeddb", "matrix-sdk-sqlite", "mime", "mime2ext", + "pin-project-lite", "rand", "reqwest", "ruma", @@ -2692,56 +2741,62 @@ dependencies = [ "serde_html_form", "serde_json", "tempfile", - "thiserror", + "thiserror 1.0.63", "tokio", "tokio-stream", "tokio-util", - "tower", + "tower 0.4.13", "tracing", "url", "urlencoding", + "vodozemac", "zeroize", ] [[package]] name = "matrix-sdk-base" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00891954d0826a94f1d130f46cbca64176003a234c1be5d9d282970d31cf0c87" +checksum = "126ede42ff624f934408005d4d3a641a505a101997a359f85029ae9b8a5b3ab2" dependencies = [ "as_variant", "async-trait", "bitflags 2.6.0", + "decancer", "eyeball", "eyeball-im", "futures-util", + "growable-bloom-filter", "matrix-sdk-common", "matrix-sdk-crypto", "matrix-sdk-store-encryption", "once_cell", + "regex", "ruma", "serde", "serde_json", - "thiserror", + "thiserror 1.0.63", "tokio", "tracing", + "unicode-normalization", ] [[package]] name = "matrix-sdk-common" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb365a626ab6f6c6a2422cfe2565522f19accb06706c6d04bca8f0f71df29c9f" +checksum = "1c355b0413586375441d67eb1682445a4bef8ebb127cf12bce0a7ed2741add75" dependencies = [ "async-trait", + "eyeball-im", "futures-core", "futures-util", "gloo-timers", - "instant", + "imbl", "ruma", "serde", "serde_json", - "thiserror", + "thiserror 1.0.63", "tokio", "tracing", "tracing-subscriber", @@ -2752,16 +2807,15 @@ dependencies = [ [[package]] name = "matrix-sdk-crypto" -version = "0.7.2" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e03a64d12a83ebe33bb55de9b77faef4ce27006f946f8468c3311f311f39ab8b" +checksum = "e45967fe90a6f20e8426178224fff6f731c0737367821d6a39ae40baf91e8e85" dependencies = [ "aes", "as_variant", "async-trait", "bs58", "byteorder", - "cbc", "cfg-if", "ctr", "eyeball", @@ -2770,6 +2824,7 @@ dependencies = [ "hkdf", "hmac", "itertools 0.12.1", + "js_option", "matrix-sdk-common", "pbkdf2", "rand", @@ -2779,47 +2834,51 @@ dependencies = [ "serde_json", "sha2", "subtle", - "thiserror", + "thiserror 1.0.63", + "time", "tokio", "tokio-stream", "tracing", "ulid", + "url", "vodozemac", "zeroize", ] [[package]] name = "matrix-sdk-indexeddb" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad388005c5d4ed2ff38f405d52aa7fa606f4e1ab51baf5f2504721124ed4a58b" +checksum = "aa3c1b0ab6b9c97a675594e4f8b8959d37ac417dbd62bfdb2ab676512ae9a5f0" dependencies = [ "anyhow", "async-trait", - "base64 0.21.7", + "base64 0.22.1", "getrandom", "gloo-utils", + "hkdf", "indexed_db_futures", "js-sys", - "matrix-sdk-base", "matrix-sdk-crypto", "matrix-sdk-store-encryption", "ruma", "serde", "serde-wasm-bindgen", "serde_json", - "thiserror", + "sha2", + "thiserror 1.0.63", "tokio", "tracing", "wasm-bindgen", "web-sys", + "zeroize", ] [[package]] name = "matrix-sdk-sqlite" -version = "0.7.1" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77a98d034dd5aa85b4da6500e60c7d5b9328a37632cf40ba38bbe2c77cea3f14" +checksum = "45c3c864379aab89141f728fd06a1334bbafd67ff089fa3d74314764db474b97" dependencies = [ "async-trait", "deadpool-sqlite", @@ -2832,7 +2891,7 @@ dependencies = [ "rusqlite", "serde", "serde_json", - "thiserror", + "thiserror 1.0.63", "tokio", "tracing", "vodozemac", @@ -2840,14 +2899,13 @@ dependencies = [ [[package]] name = "matrix-sdk-store-encryption" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a7e3162e9f982a4c57ab46df01a4775f697dec8899738bf62d7e97b63faa61c" +checksum = "9d05c000fdbbf42849ed10422349e1554b477a77b8d7183d28156bd99e124c8d" dependencies = [ + "base64 0.22.1", "blake3", "chacha20poly1305", - "displaydoc", - "getrandom", "hmac", "pbkdf2", "rand", @@ -2855,7 +2913,7 @@ dependencies = [ "serde", "serde_json", "sha2", - "thiserror", + "thiserror 1.0.63", "zeroize", ] @@ -2971,7 +3029,7 @@ dependencies = [ "radix_trie", "regex", "ropey", - "thiserror", + "thiserror 1.0.63", "unicode-segmentation", "unicode-width", ] @@ -3043,7 +3101,7 @@ checksum = "ab2156c4fce2f8df6c499cc1c763e4394b7482525bf2a9701c9d79d215f519e4" dependencies = [ "bitflags 2.6.0", "cfg-if", - "cfg_aliases", + "cfg_aliases 0.1.1", "libc", ] @@ -3296,7 +3354,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.90", ] [[package]] @@ -3491,6 +3549,26 @@ dependencies = [ "siphasher", ] +[[package]] +name = "pin-project" +version = "1.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be57f64e946e500c8ee36ef6331845d40a93055567ec57e8fae13efd33759b95" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c0f5fad0874fc7abcd4d750e76917eaebbecaa2c20bde22e1dbeeba8beb758c" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", +] + [[package]] name = "pin-project-lite" version = "0.2.14" @@ -3514,17 +3592,6 @@ dependencies = [ "futures-io", ] -[[package]] -name = "pkcs7" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d79178be066405e0602bf3035946edef6b11b3f9dde46dfe5f8bfd7dea4b77e7" -dependencies = [ - "der", - "spki", - "x509-cert", -] - [[package]] name = "pkcs8" version = "0.10.2" @@ -3637,15 +3704,6 @@ dependencies = [ "toml_edit 0.19.15", ] -[[package]] -name = "proc-macro-crate" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e8366a6159044a37876a2b9817124296703c586a5c92e2c53751fa06d8d43e8" -dependencies = [ - "toml_edit 0.20.7", -] - [[package]] name = "proc-macro-crate" version = "3.2.0" @@ -3656,43 +3714,40 @@ dependencies = [ ] [[package]] -name = "proc-macro-error" -version = "1.0.4" +name = "proc-macro-error-attr2" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" +checksum = "96de42df36bb9bba5542fe9f1a054b8cc87e172759a1868aa05c1f3acc89dfc5" dependencies = [ - "proc-macro-error-attr", "proc-macro2", "quote", - "syn 1.0.109", - "version_check", ] [[package]] -name = "proc-macro-error-attr" -version = "1.0.4" +name = "proc-macro-error2" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" +checksum = "11ec05c52be0a07b08061f7dd003e7d7092e0472bc731b4af7bb1ef876109802" dependencies = [ + "proc-macro-error-attr2", "proc-macro2", "quote", - "version_check", ] [[package]] name = "proc-macro2" -version = "1.0.86" +version = "1.0.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" +checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" dependencies = [ "unicode-ident", ] [[package]] name = "prost" -version = "0.13.1" +version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13db3d3fde688c61e2446b4d843bc27a7e8af269a69440c0308021dc92333cc" +checksum = "2c0fef6c4230e4ccf618a35c59d7ede15dea37de8427500f50aff708806e42ec" dependencies = [ "bytes", "prost-derive", @@ -3700,15 +3755,15 @@ dependencies = [ [[package]] name = "prost-derive" -version = "0.13.1" +version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18bec9b0adc4eba778b33684b7ba3e7137789434769ee3ce3930463ef904cfca" +checksum = "157c5a9d7ea5c2ed2d9fb8f495b64759f7816c7eaea54ba3978f0d63000162e3" dependencies = [ "anyhow", "itertools 0.13.0", "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.90", ] [[package]] @@ -3738,6 +3793,58 @@ dependencies = [ "memchr", ] +[[package]] +name = "quinn" +version = "0.11.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62e96808277ec6f97351a2380e6c25114bc9e67037775464979f3037c92d05ef" +dependencies = [ + "bytes", + "pin-project-lite", + "quinn-proto", + "quinn-udp", + "rustc-hash", + "rustls", + "socket2 0.5.7", + "thiserror 2.0.5", + "tokio", + "tracing", +] + +[[package]] +name = "quinn-proto" +version = "0.11.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2fe5ef3495d7d2e377ff17b1a8ce2ee2ec2a18cde8b6ad6619d65d0701c135d" +dependencies = [ + "bytes", + "getrandom", + "rand", + "ring", + "rustc-hash", + "rustls", + "rustls-pki-types", + "slab", + "thiserror 2.0.5", + "tinyvec", + "tracing", + "web-time", +] + +[[package]] +name = "quinn-udp" +version = "0.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d5a626c6807713b15cac82a6acaccd6043c9a5408c24baae07611fec3f243da" +dependencies = [ + "cfg_aliases 0.2.1", + "libc", + "once_cell", + "socket2 0.5.7", + "tracing", + "windows-sys 0.59.0", +] + [[package]] name = "quote" version = "1.0.37" @@ -3884,14 +3991,14 @@ checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" dependencies = [ "getrandom", "libredox", - "thiserror", + "thiserror 1.0.63", ] [[package]] name = "regex" -version = "1.10.6" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619" +checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" dependencies = [ "aho-corasick", "memchr", @@ -3901,9 +4008,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.7" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" +checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" dependencies = [ "aho-corasick", "memchr", @@ -3912,27 +4019,27 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.4" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "reqwest" -version = "0.11.27" +version = "0.12.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" +checksum = "a77c62af46e79de0a562e1a9849205ffcb7fc1238876e9bd743357570e04046f" dependencies = [ - "base64 0.21.7", + "base64 0.22.1", "bytes", - "encoding_rs", "futures-core", "futures-util", - "h2", "http", "http-body", + "http-body-util", "hyper", "hyper-rustls", "hyper-tls", + "hyper-util", "ipnet", "js-sys", "log", @@ -3941,13 +4048,14 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", + "quinn", "rustls", "rustls-pemfile", + "rustls-pki-types", "serde", "serde_json", "serde_urlencoded", - "sync_wrapper", - "system-configuration", + "sync_wrapper 1.0.2", "tokio", "tokio-native-tls", "tokio-rustls", @@ -3959,7 +4067,7 @@ dependencies = [ "wasm-streams", "web-sys", "webpki-roots", - "winreg", + "windows-registry", ] [[package]] @@ -4032,9 +4140,9 @@ dependencies = [ [[package]] name = "ruma" -version = "0.9.4" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2779c38df072964c63476259d9300efb07d0d1a7178c6469893636ce0c547a36" +checksum = "e94984418ae8a5e1160e6c87608141330e9ae26330abf22e3d15416efa96d48a" dependencies = [ "assign", "js_int", @@ -4043,16 +4151,19 @@ dependencies = [ "ruma-common", "ruma-events", "ruma-federation-api", + "web-time", ] [[package]] name = "ruma-client-api" -version = "0.17.4" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "641837258fa214a70823477514954ef0f5d3bc6ae8e1d5d85081856a33103386" +checksum = "325e054db8d5545c00767d9868356d61e63f2c6cb8b54768346d66696ea4ad48" dependencies = [ + "as_variant", "assign", "bytes", + "date_header", "http", "js_int", "js_option", @@ -4062,16 +4173,19 @@ dependencies = [ "serde", "serde_html_form", "serde_json", + "thiserror 1.0.63", + "url", + "web-time", ] [[package]] name = "ruma-common" -version = "0.12.1" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bca4c33c50e47b4cdceeac71bdef0c04153b0e29aa992d9030ec14a62323e85" +checksum = "ad71c7f49abaa047ba228339d34f9aaefa4d8b50ebeb8e859d0340cc2138bda8" dependencies = [ "as_variant", - "base64 0.21.7", + "base64 0.22.1", "bytes", "form_urlencoded", "getrandom", @@ -4088,18 +4202,20 @@ dependencies = [ "serde", "serde_html_form", "serde_json", - "thiserror", + "thiserror 1.0.63", + "time", "tracing", "url", "uuid", + "web-time", "wildmatch", ] [[package]] name = "ruma-events" -version = "0.27.11" +version = "0.29.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d20a52770e5a9fb30b7a1c14ba8b3dcf76dadc01674e58e40094f78e6bd5e3f1" +checksum = "be86dccf3504588c1f4dc1bda4ce1f8bbd646fc6dda40c77cc7de6e203e62dad" dependencies = [ "as_variant", "indexmap", @@ -4112,19 +4228,22 @@ dependencies = [ "ruma-macros", "serde", "serde_json", - "thiserror", + "thiserror 1.0.63", "tracing", "url", + "web-time", "wildmatch", ] [[package]] name = "ruma-federation-api" -version = "0.8.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1901c1f27bc327652d58af2a130c73acef3198abeccd24cee97f7267fdf3fe7" +checksum = "1b5a09ac22b3352bf7a350514dc9a87e1b56aba04c326ac9ce142740f7218afa" dependencies = [ + "http", "js_int", + "mime", "ruma-common", "ruma-events", "serde", @@ -4133,35 +4252,36 @@ dependencies = [ [[package]] name = "ruma-identifiers-validation" -version = "0.9.3" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf8ad1259274f2f57c20901bd1cc5e4a8f23169d1c1d887b6338b02f058e9b41" +checksum = "2e7f9b534a65698d7db3c08d94bf91de0046fe6c7893a7b360502f65e7011ac4" dependencies = [ "js_int", - "thiserror", + "thiserror 1.0.63", ] [[package]] name = "ruma-macros" -version = "0.12.0" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0280534a4b3e34416f883285fac4f9c408cd0b737890ae66f3e7a7056d14be80" +checksum = "c8d57d3cb20e8e758e8f7c5e408ce831d46758003b615100099852e468631934" dependencies = [ + "cfg-if", "once_cell", - "proc-macro-crate 2.0.0", + "proc-macro-crate 3.2.0", "proc-macro2", "quote", "ruma-identifiers-validation", "serde", - "syn 2.0.76", + "syn 2.0.90", "toml", ] [[package]] name = "rusqlite" -version = "0.30.0" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a78046161564f5e7cd9008aff3b2990b3850dc8e0349119b98e8f251e099f24d" +checksum = "b838eba278d213a8beaf485bd313fd580ca4505a00d5871caeb1457c55322cae" dependencies = [ "bitflags 2.6.0", "fallible-iterator", @@ -4177,6 +4297,12 @@ version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" +[[package]] +name = "rustc-hash" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7fb8039b3032c191086b10f11f319a6e99e1e82889c5cc6046f515c9db1d497" + [[package]] name = "rustc_version" version = "0.4.1" @@ -4215,32 +4341,44 @@ dependencies = [ [[package]] name = "rustls" -version = "0.21.12" +version = "0.23.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" +checksum = "934b404430bb06b3fae2cba809eb45a1ab1aecd64491213d7c3301b88393f8d1" dependencies = [ - "log", + "once_cell", "ring", + "rustls-pki-types", "rustls-webpki", - "sct", + "subtle", + "zeroize", ] [[package]] name = "rustls-pemfile" -version = "1.0.4" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" +checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50" dependencies = [ - "base64 0.21.7", + "rustls-pki-types", +] + +[[package]] +name = "rustls-pki-types" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16f1201b3c9a7ee8039bcadc17b7e605e2945b27eee7631788c1bd2b0643674b" +dependencies = [ + "web-time", ] [[package]] name = "rustls-webpki" -version = "0.101.7" +version = "0.102.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" +checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9" dependencies = [ "ring", + "rustls-pki-types", "untrusted", ] @@ -4277,16 +4415,6 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" -[[package]] -name = "sct" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" -dependencies = [ - "ring", - "untrusted", -] - [[package]] name = "security-framework" version = "2.11.1" @@ -4318,9 +4446,9 @@ checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" [[package]] name = "serde" -version = "1.0.209" +version = "1.0.215" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99fce0ffe7310761ca6bf9faf5115afbc19688edd00171d81b1bb1b116c63e09" +checksum = "6513c1ad0b11a9376da888e3e0baa0077f1aed55c17f50e7b2397136129fb88f" dependencies = [ "serde_derive", ] @@ -4347,13 +4475,13 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.209" +version = "1.0.215" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5831b979fd7b5439637af1752d535ff49f4860c0f341d1baeb6faf0f4242170" +checksum = "ad1e866f866923f252f05c889987993144fb74e722403468a4ebd70c3cd756c0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.90", ] [[package]] @@ -4371,9 +4499,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.127" +version = "1.0.133" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8043c06d9f82bd7271361ed64f415fe5e12a77fdb52e573e7f06a516dea329ad" +checksum = "c7fceb2473b9166b2294ef05efcb65a3db80803f0b03ef86a5fc88a2b85ee377" dependencies = [ "itoa", "memchr", @@ -4381,6 +4509,16 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_path_to_error" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af99884400da37c88f5e9146b7f1fd0fbcae8f6eec4e9da38b67d05486f814a6" +dependencies = [ + "itoa", + "serde", +] + [[package]] name = "serde_repr" version = "0.1.19" @@ -4389,7 +4527,7 @@ checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.90", ] [[package]] @@ -4594,7 +4732,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d904e7009df136af5297832a3ace3370cd14ff1546a232f4f185036c2736fcac" dependencies = [ "quote", - "syn 2.0.76", + "syn 2.0.90", ] [[package]] @@ -4660,7 +4798,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.76", + "syn 2.0.90", ] [[package]] @@ -4682,9 +4820,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.76" +version = "2.0.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578e081a14e0cefc3279b0472138c513f37b41a08d5a3cca9b6e4e8ceb6cd525" +checksum = "919d3b74a5dd0ccd15aeb8f93e7006bd9e14c295087c9896a110f490752bcf31" dependencies = [ "proc-macro2", "quote", @@ -4698,24 +4836,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" [[package]] -name = "system-configuration" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" -dependencies = [ - "bitflags 1.3.2", - "core-foundation", - "system-configuration-sys", -] - -[[package]] -name = "system-configuration-sys" -version = "0.5.0" +name = "sync_wrapper" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" +checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" dependencies = [ - "core-foundation-sys", - "libc", + "futures-core", ] [[package]] @@ -4775,7 +4901,16 @@ version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" dependencies = [ - "thiserror-impl", + "thiserror-impl 1.0.63", +] + +[[package]] +name = "thiserror" +version = "2.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "643caef17e3128658ff44d85923ef2d28af81bb71e0d67bbfe1d76f19a73e053" +dependencies = [ + "thiserror-impl 2.0.5", ] [[package]] @@ -4786,7 +4921,18 @@ checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.90", +] + +[[package]] +name = "thiserror-impl" +version = "2.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "995d0bbc9995d1f19d28b7215a9352b0fc3cd3a2d2ec95c2cadc485cdedbcdde" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", ] [[package]] @@ -4882,7 +5028,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.90", ] [[package]] @@ -4897,9 +5043,9 @@ dependencies = [ [[package]] name = "tokio-rustls" -version = "0.24.1" +version = "0.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" +checksum = "5f6d0975eaace0cf0fcadee4e4aaa5da15b5c079146f2cffb67c113be122bf37" dependencies = [ "rustls", "tokio", @@ -4962,17 +5108,6 @@ dependencies = [ "winnow 0.5.40", ] -[[package]] -name = "toml_edit" -version = "0.20.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70f427fce4d84c72b5b732388bf4a9f4531b53f74e2887e3ecb2481f68f66d81" -dependencies = [ - "indexmap", - "toml_datetime", - "winnow 0.5.40", -] - [[package]] name = "toml_edit" version = "0.22.20" @@ -4992,8 +5127,25 @@ version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" dependencies = [ + "futures-core", + "futures-util", + "pin-project", + "pin-project-lite", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "tower" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2873938d487c3cfb9aed7546dc9f2711d867c9f90c46b889989a2cb84eba6b4f" +dependencies = [ + "futures-core", "futures-util", "pin-project-lite", + "sync_wrapper 0.1.2", "tokio", "tower-layer", "tower-service", @@ -5031,7 +5183,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3566e8ce28cc0a3fe42519fc80e6b4c943cc4c8cef275620eb8dac2d3d4e06cf" dependencies = [ "crossbeam-channel", - "thiserror", + "thiserror 1.0.63", "time", "tracing-subscriber", ] @@ -5044,7 +5196,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.90", ] [[package]] @@ -5180,9 +5332,9 @@ checksum = "3b09c83c3c29d37506a3e260c08c03743a6bb66a9cd432c6934ab501a190571f" [[package]] name = "unicode-normalization" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" +checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956" dependencies = [ "tinyvec", ] @@ -5304,9 +5456,9 @@ checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] name = "vodozemac" -version = "0.7.0" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "051d4af70b53b42adf2aac459a305851b8d754f210aaf11ab509e1065beff422" +checksum = "dd4b56780b7827dd72c3c6398c3048752bebf8d1d84ec19b606b15dbc3c850b8" dependencies = [ "aes", "arrayvec", @@ -5320,7 +5472,6 @@ dependencies = [ "hkdf", "hmac", "matrix-pickle", - "pkcs7", "prost", "rand", "serde", @@ -5328,7 +5479,7 @@ dependencies = [ "serde_json", "sha2", "subtle", - "thiserror", + "thiserror 1.0.63", "x25519-dalek", "zeroize", ] @@ -5376,7 +5527,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.90", "wasm-bindgen-shared", ] @@ -5410,7 +5561,7 @@ checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.90", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -5529,9 +5680,12 @@ dependencies = [ [[package]] name = "webpki-roots" -version = "0.25.4" +version = "0.26.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" +checksum = "5d642ff16b7e79272ae451b7322067cdc17cadf68c23264be9d94a32319efe7e" +dependencies = [ + "rustls-pki-types", +] [[package]] name = "weezl" @@ -5607,6 +5761,36 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "windows-registry" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e400001bb720a623c1c69032f8e3e4cf09984deec740f007dd2b03ec864804b0" +dependencies = [ + "windows-result", + "windows-strings", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-result" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-strings" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" +dependencies = [ + "windows-result", + "windows-targets 0.52.6", +] + [[package]] name = "windows-sys" version = "0.42.0" @@ -5830,16 +6014,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "winreg" -version = "0.50.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" -dependencies = [ - "cfg-if", - "windows-sys 0.48.0", -] - [[package]] name = "wl-clipboard-rs" version = "0.8.1" @@ -5852,7 +6026,7 @@ dependencies = [ "nix 0.28.0", "os_pipe", "tempfile", - "thiserror", + "thiserror 1.0.63", "tree_magic_mini", "wayland-backend", "wayland-client", @@ -5889,17 +6063,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "x509-cert" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1301e935010a701ae5f8655edc0ad17c44bad3ac5ce8c39185f75453b720ae94" -dependencies = [ - "const-oid", - "der", - "spki", -] - [[package]] name = "xdg-home" version = "1.3.0" @@ -5921,6 +6084,12 @@ dependencies = [ "markup5ever", ] +[[package]] +name = "xxhash-rust" +version = "0.8.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a5cbf750400958819fb6178eaa83bee5cd9c29a26a40cc241df8c70fdd46984" + [[package]] name = "yansi" version = "0.5.1" @@ -6011,7 +6180,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.90", ] [[package]] @@ -6031,7 +6200,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.90", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 70c45fd..56de7d7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -87,7 +87,7 @@ version = "0.0.20" #rev = "24f3ec11c7f634005a27b26878d0fbbdcc08f272" [dependencies.matrix-sdk] -version = "0.7.1" +version = "0.8.0" default-features = false features = ["e2e-encryption", "sqlite", "sso-login"] diff --git a/src/message/mod.rs b/src/message/mod.rs index ab813bf..ab9798e 100644 --- a/src/message/mod.rs +++ b/src/message/mod.rs @@ -1096,9 +1096,9 @@ impl Message { let padding = user_gutter - 2 - width; let sender = if align_right { - space(padding) + &truncated + " " + format!("{}{} ", space(padding), truncated) } else { - truncated.into_owned() + &space(padding) + " " + format!("{}{} ", truncated, space(padding)) }; Span::styled(sender, style).into() diff --git a/src/notifications.rs b/src/notifications.rs index 32762d4..bda8790 100644 --- a/src/notifications.rs +++ b/src/notifications.rs @@ -1,11 +1,12 @@ use std::time::SystemTime; use matrix_sdk::{ + deserialized_responses::RawAnySyncOrStrippedTimelineEvent, notification_settings::{IsEncrypted, IsOneToOne, NotificationSettings, RoomNotificationMode}, room::Room as MatrixRoom, ruma::{ - api::client::push::get_notifications::v3::Notification, events::{room::message::MessageType, AnyMessageLikeEventContent, AnySyncTimelineEvent}, + serde::Raw, MilliSecondsSinceUnixEpoch, RoomId, }, @@ -53,21 +54,28 @@ pub async fn register_notifications( return; } - match parse_notification(notification, room, show_message).await { - Ok((summary, body, server_ts)) => { - if server_ts < startup_ts { - return; - } + match notification.event { + RawAnySyncOrStrippedTimelineEvent::Sync(e) => + match parse_full_notification(e, room, show_message).await { + Ok((summary, body, server_ts)) => { + if server_ts < startup_ts { + return; + } - if is_missing_mention(&body, mode, &client) { - return; - } + if is_missing_mention(&body, mode, &client) { + return; + } - send_notification(¬ify_via, &store, &summary, body.as_deref()).await; - }, - Err(err) => { - tracing::error!("Failed to extract notification data: {err}") - }, + send_notification(¬ify_via, &store, &summary, body.as_deref()).await; + }, + Err(err) => { + tracing::error!("Failed to extract notification data: {err}") + } + } + // Stripped events may be dropped silently because they're + // only relevant if we're not in a room, and we presumably + // don't want notifications for rooms we're not in. + RawAnySyncOrStrippedTimelineEvent::Stripped(_) => (), } } }) @@ -171,12 +179,12 @@ async fn is_visible_room(store: &AsyncProgramStore, room_id: &RoomId) -> bool { is_focused(&locked) && is_open(&mut locked, room_id) } -pub async fn parse_notification( - notification: Notification, +pub async fn parse_full_notification( + event: Raw, room: MatrixRoom, show_body: bool, ) -> IambResult<(String, Option, MilliSecondsSinceUnixEpoch)> { - let event = notification.event.deserialize().map_err(IambError::from)?; + let event = event.deserialize().map_err(IambError::from)?; let server_ts = event.origin_server_ts(); @@ -188,7 +196,7 @@ pub async fn parse_notification( .and_then(|m| m.display_name()) .unwrap_or_else(|| sender_id.localpart()); - let summary = if let Ok(room_name) = room.display_name().await { + let summary = if let Ok(room_name) = room.compute_display_name().await { format!("{sender_name} in {room_name}") } else { sender_name.to_string() diff --git a/src/preview.rs b/src/preview.rs index 932eb39..6bdac0c 100644 --- a/src/preview.rs +++ b/src/preview.rs @@ -5,7 +5,7 @@ use std::{ }; use matrix_sdk::{ - media::{MediaFormat, MediaRequest}, + media::{MediaFormat, MediaRequestParameters}, ruma::{ events::{ room::{ @@ -157,7 +157,7 @@ async fn download_or_load( }, Err(_) => { media - .get_media_content(&MediaRequest { source, format: MediaFormat::File }, true) + .get_media_content(&MediaRequestParameters { source, format: MediaFormat::File }, true) .await .and_then(|buffer| { if let Err(err) = diff --git a/src/windows/room/chat.rs b/src/windows/room/chat.rs index 427a2df..efbe8f1 100644 --- a/src/windows/room/chat.rs +++ b/src/windows/room/chat.rs @@ -14,7 +14,7 @@ use url::Url; use matrix_sdk::{ attachment::AttachmentConfig, - media::{MediaFormat, MediaRequest}, + media::{MediaFormat, MediaRequestParameters}, room::Room as MatrixRoom, ruma::{ events::reaction::ReactionEventContent, @@ -276,7 +276,7 @@ impl ChatState { } if !filename.exists() || flags.contains(DownloadFlags::FORCE) { - let req = MediaRequest { source, format: MediaFormat::File }; + let req = MediaRequestParameters { source, format: MediaFormat::File }; let bytes = media.get_media_content(&req, true).await.map_err(IambError::from)?; diff --git a/src/windows/room/mod.rs b/src/windows/room/mod.rs index f959172..ad2476c 100644 --- a/src/windows/room/mod.rs +++ b/src/windows/room/mod.rs @@ -26,8 +26,8 @@ use matrix_sdk::{ OwnedUserId, RoomId, }, - DisplayName, RoomState as MatrixRoomState, + RoomDisplayName, }; use ratatui::{ @@ -139,7 +139,7 @@ impl RoomState { pub fn new( room: MatrixRoom, thread: Option, - name: DisplayName, + name: RoomDisplayName, tags: Option, store: &mut ProgramStore, ) -> Self { diff --git a/src/worker.rs b/src/worker.rs index 9ca830c..e172215 100644 --- a/src/worker.rs +++ b/src/worker.rs @@ -13,6 +13,7 @@ use std::time::{Duration, Instant}; use futures::{stream::FuturesUnordered, StreamExt}; use gethostname::gethostname; +use matrix_sdk::deserialized_responses::{DecryptedRoomEvent, TimelineEventKind}; use tokio::sync::mpsc::{unbounded_channel, UnboundedReceiver, UnboundedSender}; use tokio::sync::Semaphore; use tokio::task::JoinHandle; @@ -24,6 +25,7 @@ use matrix_sdk::{ encryption::verification::{SasVerification, Verification}, encryption::{BackupDownloadStrategy, EncryptionSettings}, event_handler::Ctx, + deserialized_responses::DisplayName, matrix_auth::MatrixSession, reqwest, room::{Messages, MessagesOptions, Room as MatrixRoom, RoomMember}, @@ -78,9 +80,9 @@ use matrix_sdk::{ }, Client, ClientBuildError, - DisplayName, Error as MatrixError, RoomMemberships, + RoomDisplayName, }; use modalkit::errors::UIError; @@ -293,10 +295,25 @@ async fn load_older_one( let mut msgs = vec![]; for ev in chunk.into_iter() { - let msg = match ev.event.deserialize() { - Ok(AnyTimelineEvent::MessageLike(msg)) => msg, - Ok(AnyTimelineEvent::State(_)) => continue, - Err(_) => continue, + let msg: AnyMessageLikeEvent = match ev.kind { + TimelineEventKind::Decrypted(DecryptedRoomEvent { event, .. }) => match event.deserialize() { + Ok(e) => e, + _ => continue, + } + TimelineEventKind::PlainText { event } => match event.deserialize() { + Ok(e) => match e.into_full_event(room_id.to_owned()) { + AnyTimelineEvent::MessageLike(e) => e, + _ => continue, + } + _ => continue, + } + TimelineEventKind::UnableToDecrypt { event, .. } => match event.deserialize() { + Ok(e) => match e.into_full_event(room_id.to_owned()) { + AnyTimelineEvent::MessageLike(e) => e, + _ => continue, + } + _ => continue, + } }; let event_id = msg.event_id(); @@ -440,7 +457,7 @@ async fn refresh_rooms(client: &Client, store: &AsyncProgramStore) { let mut dms = vec![]; for room in client.invited_rooms().into_iter() { - let name = room.display_name().await.unwrap_or(DisplayName::Empty).to_string(); + let name = room.compute_display_name().await.unwrap_or(RoomDisplayName::Empty).to_string(); let tags = room.tags().await.unwrap_or_default(); names.push((room.room_id().to_owned(), name)); @@ -455,7 +472,7 @@ async fn refresh_rooms(client: &Client, store: &AsyncProgramStore) { } for room in client.joined_rooms().into_iter() { - let name = room.display_name().await.unwrap_or(DisplayName::Empty).to_string(); + let name = room.compute_display_name().await.unwrap_or(RoomDisplayName::Empty).to_string(); let tags = room.tags().await.unwrap_or_default(); names.push((room.room_id().to_owned(), name)); @@ -603,7 +620,7 @@ fn oneshot() -> (ClientReply, ClientResponse) { return (reply, response); } -pub type FetchedRoom = (MatrixRoom, DisplayName, Option); +pub type FetchedRoom = (MatrixRoom, RoomDisplayName, Option); pub enum WorkerTask { Init(AsyncProgramStore, ClientReply<()>), @@ -1077,10 +1094,10 @@ impl ClientWorker { let user_id = ev.state_key; let ambiguous_name = - ev.content.displayname.as_deref().unwrap_or_else(|| user_id.localpart()); + DisplayName::new(ev.content.displayname.as_deref().unwrap_or_else(|| user_id.as_str())); let ambiguous = client .store() - .get_users_with_display_name(room_id, ambiguous_name) + .get_users_with_display_name(room_id, &ambiguous_name) .await .map(|users| users.len() > 1) .unwrap_or_default(); @@ -1346,7 +1363,7 @@ impl ClientWorker { async fn get_room(&mut self, room_id: OwnedRoomId) -> IambResult { if let Some(room) = self.client.get_room(&room_id) { - let name = room.display_name().await.map_err(IambError::from)?; + let name = room.compute_display_name().await.map_err(IambError::from)?; let tags = room.tags().await.map_err(IambError::from)?; Ok((room, name, tags)) From 278161fd0041b3451a50d14a792dfbd5af527f7d Mon Sep 17 00:00:00 2001 From: Stu Black Date: Tue, 7 Jan 2025 12:48:26 -0500 Subject: [PATCH 2/5] Use cached_display_name, per review comments. --- src/notifications.rs | 2 +- src/worker.rs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/notifications.rs b/src/notifications.rs index bda8790..34093e4 100644 --- a/src/notifications.rs +++ b/src/notifications.rs @@ -196,7 +196,7 @@ pub async fn parse_full_notification( .and_then(|m| m.display_name()) .unwrap_or_else(|| sender_id.localpart()); - let summary = if let Ok(room_name) = room.compute_display_name().await { + let summary = if let Some(room_name) = room.cached_display_name() { format!("{sender_name} in {room_name}") } else { sender_name.to_string() diff --git a/src/worker.rs b/src/worker.rs index e172215..af974bf 100644 --- a/src/worker.rs +++ b/src/worker.rs @@ -457,7 +457,7 @@ async fn refresh_rooms(client: &Client, store: &AsyncProgramStore) { let mut dms = vec![]; for room in client.invited_rooms().into_iter() { - let name = room.compute_display_name().await.unwrap_or(RoomDisplayName::Empty).to_string(); + let name = room.cached_display_name().unwrap_or(RoomDisplayName::Empty).to_string(); let tags = room.tags().await.unwrap_or_default(); names.push((room.room_id().to_owned(), name)); @@ -472,7 +472,7 @@ async fn refresh_rooms(client: &Client, store: &AsyncProgramStore) { } for room in client.joined_rooms().into_iter() { - let name = room.compute_display_name().await.unwrap_or(RoomDisplayName::Empty).to_string(); + let name = room.cached_display_name().unwrap_or(RoomDisplayName::Empty).to_string(); let tags = room.tags().await.unwrap_or_default(); names.push((room.room_id().to_owned(), name)); @@ -1363,7 +1363,7 @@ impl ClientWorker { async fn get_room(&mut self, room_id: OwnedRoomId) -> IambResult { if let Some(room) = self.client.get_room(&room_id) { - let name = room.compute_display_name().await.map_err(IambError::from)?; + let name = room.cached_display_name().ok_or_else(|| IambError::UnknownRoom(room_id))?; let tags = room.tags().await.map_err(IambError::from)?; Ok((room, name, tags)) From e78f381a159db77a2144730b59037733fe199326 Mon Sep 17 00:00:00 2001 From: Stu Black Date: Tue, 7 Jan 2025 15:47:08 -0500 Subject: [PATCH 3/5] Consume room events directly, per review suggestion. --- src/worker.rs | 26 +++++--------------------- 1 file changed, 5 insertions(+), 21 deletions(-) diff --git a/src/worker.rs b/src/worker.rs index af974bf..a239d0d 100644 --- a/src/worker.rs +++ b/src/worker.rs @@ -13,7 +13,7 @@ use std::time::{Duration, Instant}; use futures::{stream::FuturesUnordered, StreamExt}; use gethostname::gethostname; -use matrix_sdk::deserialized_responses::{DecryptedRoomEvent, TimelineEventKind}; +use matrix_sdk::ruma::events::AnySyncTimelineEvent; use tokio::sync::mpsc::{unbounded_channel, UnboundedReceiver, UnboundedSender}; use tokio::sync::Semaphore; use tokio::task::JoinHandle; @@ -60,7 +60,6 @@ use matrix_sdk::{ typing::SyncTypingEvent, AnyInitialStateEvent, AnyMessageLikeEvent, - AnyTimelineEvent, EmptyStateKey, InitialStateEvent, SyncEphemeralRoomEvent, @@ -295,25 +294,10 @@ async fn load_older_one( let mut msgs = vec![]; for ev in chunk.into_iter() { - let msg: AnyMessageLikeEvent = match ev.kind { - TimelineEventKind::Decrypted(DecryptedRoomEvent { event, .. }) => match event.deserialize() { - Ok(e) => e, - _ => continue, - } - TimelineEventKind::PlainText { event } => match event.deserialize() { - Ok(e) => match e.into_full_event(room_id.to_owned()) { - AnyTimelineEvent::MessageLike(e) => e, - _ => continue, - } - _ => continue, - } - TimelineEventKind::UnableToDecrypt { event, .. } => match event.deserialize() { - Ok(e) => match e.into_full_event(room_id.to_owned()) { - AnyTimelineEvent::MessageLike(e) => e, - _ => continue, - } - _ => continue, - } + let deserialized = ev.into_raw().deserialize().map_err(|e| IambError::Serde(e))?; + let msg: AnyMessageLikeEvent = match deserialized { + AnySyncTimelineEvent::MessageLike(e) => e.into_full_event(room_id.to_owned()), + AnySyncTimelineEvent::State(_) => continue, }; let event_id = msg.event_id(); From 09c9882a442c7d078b002af0fdd8a9307d0d53dd Mon Sep 17 00:00:00 2001 From: Stu Black Date: Tue, 7 Jan 2025 15:50:15 -0500 Subject: [PATCH 4/5] Hit this branch with the `cargo fmt` bat, per review comment. --- src/notifications.rs | 8 +++++--- src/preview.rs | 5 ++++- src/windows/room/mod.rs | 2 +- src/worker.rs | 9 +++++---- 4 files changed, 15 insertions(+), 9 deletions(-) diff --git a/src/notifications.rs b/src/notifications.rs index 34093e4..83038a4 100644 --- a/src/notifications.rs +++ b/src/notifications.rs @@ -55,7 +55,7 @@ pub async fn register_notifications( } match notification.event { - RawAnySyncOrStrippedTimelineEvent::Sync(e) => + RawAnySyncOrStrippedTimelineEvent::Sync(e) => { match parse_full_notification(e, room, show_message).await { Ok((summary, body, server_ts)) => { if server_ts < startup_ts { @@ -66,12 +66,14 @@ pub async fn register_notifications( return; } - send_notification(¬ify_via, &store, &summary, body.as_deref()).await; + send_notification(¬ify_via, &store, &summary, body.as_deref()) + .await; }, Err(err) => { tracing::error!("Failed to extract notification data: {err}") - } + }, } + }, // Stripped events may be dropped silently because they're // only relevant if we're not in a room, and we presumably // don't want notifications for rooms we're not in. diff --git a/src/preview.rs b/src/preview.rs index 6bdac0c..cf69c1c 100644 --- a/src/preview.rs +++ b/src/preview.rs @@ -157,7 +157,10 @@ async fn download_or_load( }, Err(_) => { media - .get_media_content(&MediaRequestParameters { source, format: MediaFormat::File }, true) + .get_media_content( + &MediaRequestParameters { source, format: MediaFormat::File }, + true, + ) .await .and_then(|buffer| { if let Err(err) = diff --git a/src/windows/room/mod.rs b/src/windows/room/mod.rs index ad2476c..b6d4d23 100644 --- a/src/windows/room/mod.rs +++ b/src/windows/room/mod.rs @@ -26,8 +26,8 @@ use matrix_sdk::{ OwnedUserId, RoomId, }, - RoomState as MatrixRoomState, RoomDisplayName, + RoomState as MatrixRoomState, }; use ratatui::{ diff --git a/src/worker.rs b/src/worker.rs index a239d0d..486003a 100644 --- a/src/worker.rs +++ b/src/worker.rs @@ -22,10 +22,10 @@ use url::Url; use matrix_sdk::{ config::{RequestConfig, SyncSettings}, + deserialized_responses::DisplayName, encryption::verification::{SasVerification, Verification}, encryption::{BackupDownloadStrategy, EncryptionSettings}, event_handler::Ctx, - deserialized_responses::DisplayName, matrix_auth::MatrixSession, reqwest, room::{Messages, MessagesOptions, Room as MatrixRoom, RoomMember}, @@ -80,8 +80,8 @@ use matrix_sdk::{ Client, ClientBuildError, Error as MatrixError, - RoomMemberships, RoomDisplayName, + RoomMemberships, }; use modalkit::errors::UIError; @@ -1077,8 +1077,9 @@ impl ClientWorker { let room_id = room.room_id(); let user_id = ev.state_key; - let ambiguous_name = - DisplayName::new(ev.content.displayname.as_deref().unwrap_or_else(|| user_id.as_str())); + let ambiguous_name = DisplayName::new( + ev.content.displayname.as_deref().unwrap_or_else(|| user_id.as_str()), + ); let ambiguous = client .store() .get_users_with_display_name(room_id, &ambiguous_name) From ab144057d9333b589d5b49759ab7e0d29a68c9c2 Mon Sep 17 00:00:00 2001 From: Stu Black Date: Thu, 16 Jan 2025 08:52:51 -0500 Subject: [PATCH 5/5] Update flake.lock with `nix flake update`, per review comment. --- flake.lock | 58 +++++++++++------------------------------------------- 1 file changed, 12 insertions(+), 46 deletions(-) diff --git a/flake.lock b/flake.lock index ff2375f..00e09a9 100644 --- a/flake.lock +++ b/flake.lock @@ -5,29 +5,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1709126324, - "narHash": "sha256-q6EQdSeUZOG26WelxqkmR7kArjgWCdw5sfJVHPH/7j8=", + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", "owner": "numtide", "repo": "flake-utils", - "rev": "d465f4819400de7c8d874d50b982301f28a84605", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_2": { - "inputs": { - "systems": "systems_2" - }, - "locked": { - "lastModified": 1705309234, - "narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", "type": "github" }, "original": { @@ -38,11 +20,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1709703039, - "narHash": "sha256-6hqgQ8OK6gsMu1VtcGKBxKQInRLHtzulDo9Z5jxHEFY=", + "lastModified": 1736883708, + "narHash": "sha256-uQ+NQ0/xYU0N1CnXsa2zghgNaOPxWpMJXSUJJ9W7140=", "owner": "nixos", "repo": "nixpkgs", - "rev": "9df3e30ce24fd28c7b3e2de0d986769db5d6225d", + "rev": "eb62e6aa39ea67e0b8018ba8ea077efe65807dc8", "type": "github" }, "original": { @@ -54,11 +36,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1706487304, - "narHash": "sha256-LE8lVX28MV2jWJsidW13D2qrHU/RUUONendL2Q/WlJg=", + "lastModified": 1736320768, + "narHash": "sha256-nIYdTAiKIGnFNugbomgBJR+Xv5F1ZQU+HfaBqJKroC0=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "90f456026d284c22b3e3497be980b2e47d0b28ac", + "rev": "4bc9c909d9ac828a039f288cf872d16d38185db8", "type": "github" }, "original": { @@ -77,15 +59,14 @@ }, "rust-overlay": { "inputs": { - "flake-utils": "flake-utils_2", "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1709863839, - "narHash": "sha256-QpEL5FmZNi2By3sKZY55wGniFXc4wEn9PQczlE8TG0o=", + "lastModified": 1736994333, + "narHash": "sha256-v4Jrok5yXsZ6dwj2+2uo5cSyUi9fBTurHqHvNHLT1XA=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "e5ab9ee98f479081ad971473d2bc13c59e9fbc0a", + "rev": "848db855cb9e88785996e961951659570fc58814", "type": "github" }, "original": { @@ -108,21 +89,6 @@ "repo": "default", "type": "github" } - }, - "systems_2": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } } }, "root": "root",