From 752f8941c0487660edf0da3cf46ea59ec9f21dd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Commaille?= Date: Sat, 23 Nov 2024 10:04:31 +0100 Subject: [PATCH] chore: Upgrade matrix-sdk and ruma And run `cargo update`. --- Cargo.lock | 972 ++++++++++++++---- Cargo.toml | 12 +- src/prelude.rs | 2 +- src/session/model/room/event/mod.rs | 141 +-- src/session/model/room/mod.rs | 25 +- src/session/model/room/permissions.rs | 2 +- src/session/model/room/timeline/mod.rs | 27 +- src/session/model/session.rs | 2 +- .../verification/identity_verification.rs | 23 +- .../view/account_settings/general_page/mod.rs | 2 +- .../room_details/edit_details_subpage.rs | 3 +- .../view/content/room_history/item_row.rs | 28 +- .../message_toolbar/composer_state.rs | 12 +- .../room_history/message_toolbar/mod.rs | 5 +- src/session/view/content/room_history/mod.rs | 18 +- src/utils/matrix/ext_traits.rs | 73 ++ src/utils/matrix/mod.rs | 30 +- src/utils/media/image/mod.rs | 14 +- src/utils/media/image/queue.rs | 8 +- 19 files changed, 976 insertions(+), 423 deletions(-) create mode 100644 src/utils/matrix/ext_traits.rs diff --git a/Cargo.lock b/Cargo.lock index 9cf2d7ca..b1a36e4b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -71,11 +71,17 @@ dependencies = [ "memchr", ] +[[package]] +name = "aligned-vec" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4aa90d7ce82d4be67b64039a3d588d38dbcc6736577de4a847025ce5b0c468d1" + [[package]] name = "allocator-api2" -version = "0.2.18" +version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" +checksum = "45862d1c77f2228b9e10bc609d5bc203d86ebc9b87ad8d5d5167a6c9abf739d9" [[package]] name = "android-tzdata" @@ -104,9 +110,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.89" +version = "1.0.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86fdf8605db99b54d3cd748a44c6d04df638eb5dafb219b135d0149bd0db01f6" +checksum = "4c95c10ba0b00a02636238b814946408b1322d5ac4760326e6fb8ec956d85775" [[package]] name = "anymap2" @@ -128,6 +134,23 @@ dependencies = [ "syn", ] +[[package]] +name = "arbitrary" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dde20b3d026af13f561bdd0f15edf01fc734f0dafcedbaf42bba506a9517f223" + +[[package]] +name = "arg_enum_proc_macro" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ae92a5119aa49cdbcf6b9f893fe4e1d98b04ccbf82ee0584ad948a44a734dea" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "arrayref" version = "0.3.9" @@ -200,9 +223,9 @@ dependencies = [ [[package]] name = "async-compression" -version = "0.4.15" +version = "0.4.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e26a9844c659a2a293d239c7910b752f8487fe122c6c8bd1659bf85a6507c302" +checksum = "0cb8f1d480b0ea3783ab015936d2a55c87e219676f0c0b7dec61494043f21857" dependencies = [ "flate2", "futures-core", @@ -213,9 +236,9 @@ dependencies = [ [[package]] name = "async-io" -version = "2.3.4" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "444b0228950ee6501b3568d3c93bf1176a1fdbc3b758dcd9475046d30f4dc7e8" +checksum = "43a2b323ccce0a1d90b449fd71f2a06ca7faa7c54c2751f06c9bd851fc061059" dependencies = [ "async-lock", "cfg-if", @@ -368,11 +391,34 @@ version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" +[[package]] +name = "av1-grain" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6678909d8c5d46a42abcf571271e15fdbc0a225e3646cf23762cd415046c78bf" +dependencies = [ + "anyhow", + "arrayvec", + "log", + "nom", + "num-rational", + "v_frame", +] + +[[package]] +name = "avif-serialize" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e335041290c43101ca215eed6f43ec437eb5a42125573f600fc3fa42b9bddd62" +dependencies = [ + "arrayvec", +] + [[package]] name = "axum" -version = "0.7.5" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a6c9af12842a67734c9a2e355436e5d03b22383ed60cf13cd0c18fbfe3dcbcf" +checksum = "edca88bc138befd0323b20752846e6587272d3b03b0343c8ea28a6f819e6e71f" dependencies = [ "async-trait", "axum-core", @@ -394,9 +440,9 @@ dependencies = [ "serde_json", "serde_path_to_error", "serde_urlencoded", - "sync_wrapper", + "sync_wrapper 1.0.2", "tokio", - "tower", + "tower 0.5.1", "tower-layer", "tower-service", "tracing", @@ -417,7 +463,7 @@ dependencies = [ "mime", "pin-project-lite", "rustversion", - "sync_wrapper", + "sync_wrapper 1.0.2", "tower-layer", "tower-service", "tracing", @@ -506,6 +552,12 @@ version = "3.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1d084b0137aaa901caf9f1e8b21daa6aa24d41cd806e111335541eff9683bd6" +[[package]] +name = "bitstream-io" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6099cdc01846bc367c4e7dd630dc5966dccf36b652fae7a74e17b640411a91b2" + [[package]] name = "blake3" version = "1.5.4" @@ -565,6 +617,12 @@ dependencies = [ "tinyvec", ] +[[package]] +name = "built" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c360505aed52b7ec96a3636c3f039d99103c37d1d9b4f7a8c743d3ea9ffcd03b" + [[package]] name = "bumpalo" version = "3.16.0" @@ -573,9 +631,9 @@ checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" [[package]] name = "bytemuck" -version = "1.19.0" +version = "1.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8334215b81e418a0a7bdb8ef0849474f40bb10c8b71f1c4ed315cff49f32494d" +checksum = "8b37c88a63ffd85d15b406896cc343916d7cf57838a847b3a6f2ca5d39a5695a" [[package]] name = "byteorder" @@ -591,9 +649,9 @@ checksum = "8f1fe948ff07f4bd06c30984e69f5b4899c516a3ef74f34df92a2df2ab535495" [[package]] name = "bytes" -version = "1.7.2" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "428d9aa8fbc0670b7b8d6030a7fadd0f86151cae55e4dbbece15f3780a3dfaf3" +checksum = "9ac0150caa2ae65ca5bd83f25c7de183dea78d4d366469f148435e2acfbad0da" [[package]] name = "bytesize" @@ -603,9 +661,9 @@ checksum = "a3e368af43e418a04d52505cf3dbc23dda4e3407ae2fa99fd0e4f308ce546acc" [[package]] name = "cairo-rs" -version = "0.20.1" +version = "0.20.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8a0ea147c94108c9613235388f540e4d14c327f7081c9e471fc8ee8a2533e69" +checksum = "d7fa699e1d7ae691001a811dda5ef0e3e42e1d4119b26426352989df9e94e3e6" dependencies = [ "bitflags 2.6.0", "cairo-sys-rs", @@ -635,9 +693,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.1.30" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b16803a61b81d9eabb7eae2588776c4c1e584b738ede45fdbb4c972cec1e9945" +checksum = "fd9de9f2205d5ef3fd67e685b0df337994ddd4495e2a28d185500d0e1edfea47" dependencies = [ "jobserver", "libc", @@ -665,9 +723,9 @@ dependencies = [ [[package]] name = "cfg-expr" -version = "0.17.0" +version = "0.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0890061c4d3223e7267f3bad2ec40b997d64faac1c2815a4a9d95018e2b9e9c" +checksum = "c360837f8f19e2e4468275138f1c0dec1647d1e17bb7c0215fe3cd7530e93c25" dependencies = [ "smallvec", "target-lexicon", @@ -808,9 +866,9 @@ checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "cpufeatures" -version = "0.2.14" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608697df725056feaccfa42cffdaeeec3fccc4ffc38358ecd19b243e716a78e0" +checksum = "16b80225097f2e5ae4e7179dd2266824648f3e2f49d9134d584b76389d31c4c3" dependencies = [ "libc", ] @@ -978,6 +1036,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", + "paste", + "regex", +] + [[package]] name = "delegate-display" version = "2.1.1" @@ -1051,6 +1120,17 @@ dependencies = [ "subtle", ] +[[package]] +name = "displaydoc" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "djb_hash" version = "0.1.3" @@ -1201,22 +1281,21 @@ dependencies = [ [[package]] name = "eyeball-im" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ae8c5165c9770f3ec7cccce12f4c5d70f01fa8bf84cf30cfbfd5a1c6f8901d5" +checksum = "a1c02432230060cae0621e15803e073976d22974e0f013c9cb28a4ea1b484629" dependencies = [ "futures-core", "imbl", "tokio", - "tokio-util", "tracing", ] [[package]] name = "eyeball-im-util" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32b6b037e2cdce928a432ecc2880c944e5436d8a38c827974b882ad373f60037" +checksum = "f63a70e454238b5f66a0a0544c3e6a38be765cb01f34da9b94a2f3ecd8777cf8" dependencies = [ "arrayvec", "eyeball-im", @@ -1252,9 +1331,9 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.1.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" +checksum = "486f806e73c5707928240ddc295403b1b93c96a02038563881c4a2fd84b81ac4" [[package]] name = "fiat-crypto" @@ -1274,9 +1353,9 @@ dependencies = [ [[package]] name = "flate2" -version = "1.0.34" +version = "1.0.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1b589b4dc103969ad3cf85c950899926ec64300a1a46d76c03a6072957036f0" +checksum = "c936bfdafb507ebbf50b8074c54fa31c5be9a1e7e5f467dd659697041407d07c" dependencies = [ "crc32fast", "miniz_oxide", @@ -1457,9 +1536,9 @@ checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" [[package]] name = "futures-lite" -version = "2.3.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52527eb5074e35e9339c6b4e8d12600c7128b68fb25dcb9fa9dec18f7c25f3a5" +checksum = "cef40d21ae2c515b51041df9ed313ed21e572df340ea58a922a0aefe7e8891a1" dependencies = [ "fastrand", "futures-core", @@ -1573,9 +1652,9 @@ dependencies = [ [[package]] name = "gdk4" -version = "0.9.2" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c121aeeb0cf7545877ae615dac6bfd088b739d8abee4d55e7143b06927d16a31" +checksum = "75933c4a86e8a2428814d367e22c733304fdfabc87f415750fd2f55409b6ee48" dependencies = [ "cairo-rs", "gdk-pixbuf", @@ -1588,9 +1667,9 @@ dependencies = [ [[package]] name = "gdk4-sys" -version = "0.9.2" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d3c03d1ea9d5199f14f060890fde68a3b5ec5699144773d1fa6abf337bfbc9c" +checksum = "20af0656d543aed3e57ac4120ef76d091c3c42ab1e0507a8febde7cd005640e2" dependencies = [ "cairo-sys-rs", "gdk-pixbuf-sys", @@ -1605,9 +1684,9 @@ dependencies = [ [[package]] name = "gdk4-win32" -version = "0.9.2" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "275e0a5470f8da4ec00cf1856d4ebae4cd022b9abbb5eb2dbd57f511ca35fd22" +checksum = "7bfc32196e899bffd0d98238d10284d0ce4fe2bff4e5da07f56205e1657ae30f" dependencies = [ "gdk4", "gdk4-win32-sys", @@ -1618,9 +1697,9 @@ dependencies = [ [[package]] name = "gdk4-win32-sys" -version = "0.9.2" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7e8c93bb66b07216f516a94c997b13c41b26fc0fda1866542e3894e508c120a" +checksum = "c3f535dc7768918e5a3b0224d5ce9674ecc9a698fbdac645040627b33db2d183" dependencies = [ "gdk4-sys", "glib-sys", @@ -1698,9 +1777,9 @@ checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" [[package]] name = "gio" -version = "0.20.4" +version = "0.20.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8d999e8fb09583e96080867e364bc1e701284ad206c76a5af480d63833ad43c" +checksum = "8826d2a9ad56ce3de1f04bea0bea0daff6f5f1c913cc834996cfea1f9401361c" dependencies = [ "futures-channel", "futures-core", @@ -1715,9 +1794,9 @@ dependencies = [ [[package]] name = "gio-sys" -version = "0.20.4" +version = "0.20.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f7efc368de04755344f0084104835b6bb71df2c1d41e37d863947392a894779" +checksum = "b965df6f3534c84816b5c1a7d9efcb5671ae790822de5abe8e299797039529bc" dependencies = [ "glib-sys", "gobject-sys", @@ -1728,9 +1807,9 @@ dependencies = [ [[package]] name = "glib" -version = "0.20.4" +version = "0.20.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adcf1ec6d3650bf9fdbc6cee242d4fcebc6f6bfd9bea5b929b6a8b7344eb85ff" +checksum = "86bd3e4ee7998ab5a135d900db56930cc19ad16681adf245daff54f618b9d5e1" dependencies = [ "bitflags 2.6.0", "futures-channel", @@ -1749,9 +1828,9 @@ dependencies = [ [[package]] name = "glib-macros" -version = "0.20.4" +version = "0.20.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6bf88f70cd5720a6197639dcabcb378dd528d0cb68cb1f45e3b358bcb841cd7" +checksum = "e7d21ca27acfc3e91da70456edde144b4ac7c36f78ee77b10189b3eb4901c156" dependencies = [ "heck", "proc-macro-crate", @@ -1762,9 +1841,9 @@ dependencies = [ [[package]] name = "glib-sys" -version = "0.20.4" +version = "0.20.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f9eca5d88cfa6a453b00d203287c34a2b7cac3a7831779aa2bb0b3c7233752b" +checksum = "3d0b1827e8621fc42c0dfb228e5d57ff6a71f9699e666ece8113f979ad87c2de" dependencies = [ "libc", "system-deps 7.0.3", @@ -1803,9 +1882,9 @@ dependencies = [ [[package]] name = "glycin" -version = "2.0.1" +version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99ceb553ed23c012e4e16ba9212b495eb458ad831eb5f892b6b44406f0966286" +checksum = "8c4206f0d933268b06a8809c496d7f7d7b0626bb33aa97a4a209e795913157c6" dependencies = [ "futures-channel", "futures-util", @@ -1832,9 +1911,9 @@ dependencies = [ [[package]] name = "glycin-utils" -version = "2.0.0" +version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c6132ef2817b05110f3b1f98c53dbddaac74ea8366472354ab486d02442f08f" +checksum = "2d4ea3c2b8d5aa43d87d60bb7f944c58aaade41d870e4258e69e204bbcd73a09" dependencies = [ "env_logger", "gufo-common", @@ -1899,9 +1978,9 @@ dependencies = [ [[package]] name = "gsk4" -version = "0.9.2" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa21a2f7c51ee1c6cc1242c2faf3aae2b7566138f182696759987bde8219e922" +checksum = "b36933c1e79df378aa6e606576e680358a9582ed8c16f33e94899636e6fa6df6" dependencies = [ "cairo-rs", "gdk4", @@ -1914,9 +1993,9 @@ dependencies = [ [[package]] name = "gsk4-sys" -version = "0.9.2" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f9fb607554f9f4e8829eb7ea301b0fde051e1dbfd5d16b143a8a9c2fac6c01b" +checksum = "0877a9d485bd9ba5262b0c9bce39e63750e525e3aebeb359d271ca1f0e111f1d" dependencies = [ "cairo-sys-rs", "gdk4-sys", @@ -1930,9 +2009,9 @@ dependencies = [ [[package]] name = "gst-plugin-gtk4" -version = "0.13.1" +version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44b3fe6a92ebf2e62366d9f2d8633cc634187bb7c40fe4db05edfb809e928197" +checksum = "3f2b5a56ae8d5b67c14ccc2a0613e1e0b9c353f19429f984e8c379960db8efe1" dependencies = [ "async-channel", "gdk4-win32", @@ -1958,9 +2037,9 @@ dependencies = [ [[package]] name = "gstreamer" -version = "0.23.2" +version = "0.23.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49ecf3bcfc2ceb82ce02437f53ff2fcaee5e7d45ae697ab64a018408749779b9" +checksum = "680006694e79692f831ca4f3ba6e147b8c23db289b2df1d33a4a97fd038145d7" dependencies = [ "cfg-if", "futures-channel", @@ -1983,9 +2062,9 @@ dependencies = [ [[package]] name = "gstreamer-app" -version = "0.23.2" +version = "0.23.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54a4ec9f0d2037349c82f589c1cbfe788a62f4941851924bb7c3929a6a790007" +checksum = "36bb7eb2817ba1ac56e8dc5ee6a1cb110f67f025f38527e9a327c5d4e2d5ef44" dependencies = [ "futures-core", "futures-sink", @@ -2027,9 +2106,9 @@ dependencies = [ [[package]] name = "gstreamer-audio-sys" -version = "0.23.2" +version = "0.23.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d84744e7ac8f8bc0cf76b7be40f2d5be12e6cf197e4c6ca9d3438109c21e2f51" +checksum = "980a205553927ec2167ad79b80819df79c3683632abefbe255baffe1b4112044" dependencies = [ "glib-sys", "gobject-sys", @@ -2041,9 +2120,9 @@ dependencies = [ [[package]] name = "gstreamer-base" -version = "0.23.2" +version = "0.23.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46ce7330d2995138a77192ea20961422ddee1578e1a47480acb820c43ceb0e2d" +checksum = "a11df90e3abf1d9747111c41902338fc1bd13b1c23b27fb828d43e57bd190134" dependencies = [ "atomic_refcell", "cfg-if", @@ -2055,9 +2134,9 @@ dependencies = [ [[package]] name = "gstreamer-base-sys" -version = "0.23.2" +version = "0.23.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7796e694c21c215447811c9cff694dce1fc6e02b0bbafb75cd8583b6aefe9e5f" +checksum = "d691b2bb51a9e5727fb33c3b53fb64ee5b80c40cbbd250941a6d44b142f7a6a0" dependencies = [ "glib-sys", "gobject-sys", @@ -2068,9 +2147,9 @@ dependencies = [ [[package]] name = "gstreamer-gl" -version = "0.23.2" +version = "0.23.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee43a7573ace4dc3dd2256a4285d814452c29f6824ea286be8e5c8934ecd124f" +checksum = "f58689131e0372bdc3918d0bc8463dde8fa5b3a857de2d10106256db3277d394" dependencies = [ "glib", "gstreamer", @@ -2155,9 +2234,9 @@ dependencies = [ [[package]] name = "gstreamer-sys" -version = "0.23.2" +version = "0.23.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb3859929db32f26a35818d0d9ed82f0887c9221ca402ddefaea2bb99833d535" +checksum = "db89964774a97d5b092e2d124debc6bbcaf34b5c7cdef1759f4a9e1e3f8326ef" dependencies = [ "glib-sys", "gobject-sys", @@ -2167,9 +2246,9 @@ dependencies = [ [[package]] name = "gstreamer-video" -version = "0.23.2" +version = "0.23.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "696ac49ef4c635230b4e4bdebb72cdc31b7a3e8f4fd3f2c1b5009bb10d4ec922" +checksum = "e94193e7e4c07ba97f1627bd9907bd187e90cdac8849bb78479d744e9121893b" dependencies = [ "cfg-if", "futures-channel", @@ -2184,9 +2263,9 @@ dependencies = [ [[package]] name = "gstreamer-video-sys" -version = "0.23.2" +version = "0.23.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "303620a75f22015110ead435c08577bfb7f7425a13b0165e1d03628725742f14" +checksum = "f81660cfa5a7b9973a51229785581d029da1681bf5aceffd5a4f32021db85ac0" dependencies = [ "glib-sys", "gobject-sys", @@ -2198,9 +2277,9 @@ dependencies = [ [[package]] name = "gtk4" -version = "0.9.2" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31e2d105ce672f5cdcb5af2602e91c2901e91c72da15ab76f613ad57ecf04c6d" +checksum = "9376d14d7e33486c54823a42bef296e882b9f25cb4c52b52f4d1d57bbadb5b6d" dependencies = [ "cairo-rs", "field-offset", @@ -2219,9 +2298,9 @@ dependencies = [ [[package]] name = "gtk4-macros" -version = "0.9.1" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9e7b362c8fccd2712297903717d65d30defdab2b509bc9d209cbe5ffb9fabaf" +checksum = "a7c518d5dd41c57385c7cd30af52e261820c897fc1144e558bb88c303d048ae2" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -2231,9 +2310,9 @@ dependencies = [ [[package]] name = "gtk4-sys" -version = "0.9.2" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbe4325908b1c1642dbb48e9f49c07a73185babf43e8b2065b0f881a589f55b8" +checksum = "e653b0a9001ba9be1ffddb9373bfe9a111f688222f5aeee2841481300d91b55a" dependencies = [ "cairo-sys-rs", "gdk-pixbuf-sys", @@ -2281,9 +2360,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.15.0" +version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" +checksum = "3a9bfc1af68b1726ea47d3d5109de126281def866b33970e10fbab11b5dafab3" dependencies = [ "allocator-api2", "equivalent", @@ -2409,9 +2488,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "1.4.1" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50dfd22e0e76d0f662d429a5f80fcaf3855009297eab6a0a9f8543834744ba05" +checksum = "97818827ef4f364230e16705d4706e2897df2bb60617d6ca15d598025a3c481f" dependencies = [ "bytes", "futures-channel", @@ -2445,9 +2524,9 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.9" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41296eb09f183ac68eec06e03cdbea2e759633d4067b2f6552fc2e009bcad08b" +checksum = "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4" dependencies = [ "bytes", "futures-channel", @@ -2485,6 +2564,124 @@ dependencies = [ "cc", ] +[[package]] +name = "icu_collections" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locid" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_locid_transform" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_locid_transform_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_locid_transform_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e" + +[[package]] +name = "icu_normalizer" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "utf16_iter", + "utf8_iter", + "write16", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516" + +[[package]] +name = "icu_properties" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_locid_transform", + "icu_properties_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569" + +[[package]] +name = "icu_provider" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_provider_macros", + "stable_deref_trait", + "tinystr", + "writeable", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_provider_macros" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "ident_case" version = "1.0.1" @@ -2493,23 +2690,35 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "idna" -version = "0.5.0" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" dependencies = [ - "unicode-bidi", - "unicode-normalization", + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71" +dependencies = [ + "icu_normalizer", + "icu_properties", ] [[package]] name = "image" -version = "0.25.2" +version = "0.25.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99314c8a2152b8ddb211f924cdae532d8c5e4c8bb54728e12fff1b0cd5963a10" +checksum = "cd6f44aed642f18953a158afeb30206f4d50da59fbc66ecb53c66488de73563b" dependencies = [ "bytemuck", "byteorder-lite", "num-traits", + "ravif", "rayon", ] @@ -2536,6 +2745,12 @@ dependencies = [ "bitmaps", ] +[[package]] +name = "imgref" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0263a3d970d5c054ed9312c0057b4f3bde9c0b33836d3637361d4a9e6e7a408" + [[package]] name = "include_dir" version = "0.7.4" @@ -2579,7 +2794,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" dependencies = [ "equivalent", - "hashbrown 0.15.0", + "hashbrown 0.15.1", "serde", ] @@ -2602,6 +2817,17 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "interpolate_name" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c34819042dc3d3971c46c2190835914dfbe0c3c13f61449b2997f4e9722dfa60" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "ipnet" version = "2.10.1" @@ -2637,9 +2863,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.11" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" +checksum = "540654e97a3f4470a492cd30ff187bc95d89557a903a2bbf112e2fae98104ef2" [[package]] name = "jobserver" @@ -2679,9 +2905,9 @@ dependencies = [ [[package]] name = "konst" -version = "0.3.9" +version = "0.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50a0ba6de5f7af397afff922f22c149ff605c766cd3269cf6c1cd5e466dbe3b9" +checksum = "ed986a294ccbcc4cbb7de5a1cf8f62e2473d85cf220e72cb01afe20d49194481" dependencies = [ "const_panic", "konst_kernel", @@ -2690,9 +2916,9 @@ dependencies = [ [[package]] name = "konst_kernel" -version = "0.3.9" +version = "0.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be0a455a1719220fd6adf756088e1c69a85bf14b6a9e24537a5cc04f503edb2b" +checksum = "599c1232f55c72c7fc378335a3efe1c878c92720838c8e6a4fd87784ef7764de" dependencies = [ "typewit", ] @@ -2737,9 +2963,9 @@ dependencies = [ [[package]] name = "libadwaita" -version = "0.7.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ff9c222b5c783729de45185f07b2fec2d43a7f9c63961e777d3667e20443878" +checksum = "8611ee9fb85e7606c362b513afcaf5b59853f79e4d98caaaf581d99465014247" dependencies = [ "gdk4", "gio", @@ -2752,9 +2978,9 @@ dependencies = [ [[package]] name = "libadwaita-sys" -version = "0.7.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c44d8bdbad31d6639e1f20cc9c1424f1a8e02d751fc28d44659bf743fb9eca6" +checksum = "b099a223560118d4d4fa04b6d23f3ea5b7171fe1d83dfb7e6b45b54cdfc83af9" dependencies = [ "gdk4-sys", "gio-sys", @@ -2768,9 +2994,19 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.159" +version = "0.2.164" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "561d97a539a36e26a9a5fad1ea11a3039a67714694aaa379433e580854bc3dc5" +checksum = "433bfe06b8c75da9b2e3fbea6e5329ff87748f0b144ef75306e674c3f6f7c13f" + +[[package]] +name = "libfuzzer-sys" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b9569d2f74e257076d8c6bfa73fb505b46b851e51ddaecc825944aa3bed17fa" +dependencies = [ + "arbitrary", + "cc", +] [[package]] name = "libloading" @@ -2784,9 +3020,9 @@ dependencies = [ [[package]] name = "libm" -version = "0.2.8" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" +checksum = "8355be11b20d696c8f18f6cc018c4e372165b1fa8126cef092399c9951984ffa" [[package]] name = "libseccomp" @@ -2900,6 +3136,12 @@ version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" +[[package]] +name = "litemap" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "643cb0b8d4fcc284004d5fd0d67ccf61dfffadb7f75e1e71bc420f4688a3a704" + [[package]] name = "locale_config" version = "0.3.0" @@ -2929,13 +3171,22 @@ version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" +[[package]] +name = "loop9" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fae87c125b03c1d2c0150c90365d7d6bcc53fb73a9acaef207d2d065860f062" +dependencies = [ + "imgref", +] + [[package]] name = "lru" version = "0.12.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "234cf4f4a04dc1f57e24b96cc0cd600cf2af460d4161ac5ecdd0af8e1f3b2a38" dependencies = [ - "hashbrown 0.15.0", + "hashbrown 0.15.1", ] [[package]] @@ -3060,8 +3311,8 @@ dependencies = [ [[package]] name = "matrix-sdk" -version = "0.7.1" -source = "git+https://github.com/matrix-org/matrix-rust-sdk.git?rev=ee4ef2eb539f25d69ea3582a80646e467adceafd#ee4ef2eb539f25d69ea3582a80646e467adceafd" +version = "0.8.0" +source = "git+https://github.com/matrix-org/matrix-rust-sdk.git?rev=e55a1c7e00d2693d87d798f09852161d5cbf0495#e55a1c7e00d2693d87d798f09852161d5cbf0495" dependencies = [ "anymap2", "aquamarine", @@ -3079,6 +3330,7 @@ dependencies = [ "futures-core", "futures-util", "gloo-timers", + "growable-bloom-filter", "http", "imbl", "indexmap", @@ -3089,6 +3341,7 @@ dependencies = [ "matrix-sdk-sqlite", "mime", "mime2ext", + "pin-project-lite", "rand", "reqwest", "ruma", @@ -3100,7 +3353,7 @@ dependencies = [ "tokio", "tokio-stream", "tokio-util", - "tower", + "tower 0.4.13", "tracing", "url", "urlencoding", @@ -3110,12 +3363,13 @@ dependencies = [ [[package]] name = "matrix-sdk-base" -version = "0.7.0" -source = "git+https://github.com/matrix-org/matrix-rust-sdk.git?rev=ee4ef2eb539f25d69ea3582a80646e467adceafd#ee4ef2eb539f25d69ea3582a80646e467adceafd" +version = "0.8.0" +source = "git+https://github.com/matrix-org/matrix-rust-sdk.git?rev=e55a1c7e00d2693d87d798f09852161d5cbf0495#e55a1c7e00d2693d87d798f09852161d5cbf0495" dependencies = [ "as_variant", "async-trait", "bitflags 2.6.0", + "decancer", "eyeball", "eyeball-im", "futures-util", @@ -3124,23 +3378,27 @@ dependencies = [ "matrix-sdk-crypto", "matrix-sdk-store-encryption", "once_cell", + "regex", "ruma", "serde", "serde_json", "thiserror", "tokio", "tracing", + "unicode-normalization", ] [[package]] name = "matrix-sdk-common" -version = "0.7.0" -source = "git+https://github.com/matrix-org/matrix-rust-sdk.git?rev=ee4ef2eb539f25d69ea3582a80646e467adceafd#ee4ef2eb539f25d69ea3582a80646e467adceafd" +version = "0.8.0" +source = "git+https://github.com/matrix-org/matrix-rust-sdk.git?rev=e55a1c7e00d2693d87d798f09852161d5cbf0495#e55a1c7e00d2693d87d798f09852161d5cbf0495" dependencies = [ "async-trait", + "eyeball-im", "futures-core", "futures-util", "gloo-timers", + "imbl", "ruma", "serde", "serde_json", @@ -3155,10 +3413,11 @@ dependencies = [ [[package]] name = "matrix-sdk-crypto" -version = "0.7.2" -source = "git+https://github.com/matrix-org/matrix-rust-sdk.git?rev=ee4ef2eb539f25d69ea3582a80646e467adceafd#ee4ef2eb539f25d69ea3582a80646e467adceafd" +version = "0.8.0" +source = "git+https://github.com/matrix-org/matrix-rust-sdk.git?rev=e55a1c7e00d2693d87d798f09852161d5cbf0495#e55a1c7e00d2693d87d798f09852161d5cbf0495" dependencies = [ "aes", + "aquamarine", "as_variant", "async-trait", "bs58", @@ -3195,8 +3454,8 @@ dependencies = [ [[package]] name = "matrix-sdk-indexeddb" -version = "0.7.0" -source = "git+https://github.com/matrix-org/matrix-rust-sdk.git?rev=ee4ef2eb539f25d69ea3582a80646e467adceafd#ee4ef2eb539f25d69ea3582a80646e467adceafd" +version = "0.8.0" +source = "git+https://github.com/matrix-org/matrix-rust-sdk.git?rev=e55a1c7e00d2693d87d798f09852161d5cbf0495#e55a1c7e00d2693d87d798f09852161d5cbf0495" dependencies = [ "anyhow", "async-trait", @@ -3223,8 +3482,8 @@ dependencies = [ [[package]] name = "matrix-sdk-qrcode" -version = "0.7.1" -source = "git+https://github.com/matrix-org/matrix-rust-sdk.git?rev=ee4ef2eb539f25d69ea3582a80646e467adceafd#ee4ef2eb539f25d69ea3582a80646e467adceafd" +version = "0.8.0" +source = "git+https://github.com/matrix-org/matrix-rust-sdk.git?rev=e55a1c7e00d2693d87d798f09852161d5cbf0495#e55a1c7e00d2693d87d798f09852161d5cbf0495" dependencies = [ "byteorder", "qrcode", @@ -3235,8 +3494,8 @@ dependencies = [ [[package]] name = "matrix-sdk-sqlite" -version = "0.7.1" -source = "git+https://github.com/matrix-org/matrix-rust-sdk.git?rev=ee4ef2eb539f25d69ea3582a80646e467adceafd#ee4ef2eb539f25d69ea3582a80646e467adceafd" +version = "0.8.0" +source = "git+https://github.com/matrix-org/matrix-rust-sdk.git?rev=e55a1c7e00d2693d87d798f09852161d5cbf0495#e55a1c7e00d2693d87d798f09852161d5cbf0495" dependencies = [ "async-trait", "deadpool-sqlite", @@ -3257,8 +3516,8 @@ dependencies = [ [[package]] name = "matrix-sdk-store-encryption" -version = "0.7.0" -source = "git+https://github.com/matrix-org/matrix-rust-sdk.git?rev=ee4ef2eb539f25d69ea3582a80646e467adceafd#ee4ef2eb539f25d69ea3582a80646e467adceafd" +version = "0.8.0" +source = "git+https://github.com/matrix-org/matrix-rust-sdk.git?rev=e55a1c7e00d2693d87d798f09852161d5cbf0495#e55a1c7e00d2693d87d798f09852161d5cbf0495" dependencies = [ "base64", "blake3", @@ -3276,8 +3535,8 @@ dependencies = [ [[package]] name = "matrix-sdk-ui" -version = "0.7.0" -source = "git+https://github.com/matrix-org/matrix-rust-sdk.git?rev=ee4ef2eb539f25d69ea3582a80646e467adceafd#ee4ef2eb539f25d69ea3582a80646e467adceafd" +version = "0.8.0" +source = "git+https://github.com/matrix-org/matrix-rust-sdk.git?rev=e55a1c7e00d2693d87d798f09852161d5cbf0495#e55a1c7e00d2693d87d798f09852161d5cbf0495" dependencies = [ "as_variant", "async-once-cell", @@ -3310,6 +3569,16 @@ dependencies = [ "unicode-normalization", ] +[[package]] +name = "maybe-rayon" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ea1f30cedd69f0a2954655f7188c6a834246d2bcf1e315e2ac40c4b24dc9519" +dependencies = [ + "cfg-if", + "rayon", +] + [[package]] name = "memchr" version = "2.7.4" @@ -3455,6 +3724,12 @@ dependencies = [ "minimal-lexical", ] +[[package]] +name = "noop_proc_macro" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0676bb32a98c1a483ce53e500a81ad9c3d5b3f7c920c28c24e9cb0980d0b5bc8" + [[package]] name = "nu-ansi-term" version = "0.46.0" @@ -3522,6 +3797,17 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" +[[package]] +name = "num-derive" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "num-integer" version = "0.1.46" @@ -3644,9 +3930,9 @@ checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" [[package]] name = "openssl" -version = "0.10.66" +version = "0.10.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9529f4786b70a3e8c61e11179af17ab6188ad8d0ded78c5529441ed39d4bd9c1" +checksum = "6174bc48f102d208783c2c84bf931bb75927a617866870de8a4ea85597f871f5" dependencies = [ "bitflags 2.6.0", "cfg-if", @@ -3676,9 +3962,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.103" +version = "0.9.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f9e8deee91df40a943c71b917e5874b951d32a802526c85721ce3b776c929d6" +checksum = "45abf306cbf99debc8195b66b7346498d7b10c210de50418b5ccd7ceba08c741" dependencies = [ "cc", "libc", @@ -3713,9 +3999,9 @@ checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" [[package]] name = "pango" -version = "0.20.4" +version = "0.20.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa26aa54b11094d72141a754901cd71d9356432bb8147f9cace8d9c7ba95f356" +checksum = "71e34e7ca2c52e3933d7e5251409a82b83725fa9d6d48fbdaacec056b3a0554a" dependencies = [ "gio", "glib", @@ -3859,18 +4145,18 @@ dependencies = [ [[package]] name = "pin-project" -version = "1.1.6" +version = "1.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf123a161dde1e524adf36f90bc5d8d3462824a9c43553ad07a8183161189ec" +checksum = "be57f64e946e500c8ee36ef6331845d40a93055567ec57e8fae13efd33759b95" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.6" +version = "1.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4502d8515ca9f32f1fb543d987f63d95a14934883db45bdb48060b6b69257f8" +checksum = "3c0f5fad0874fc7abcd4d750e76917eaebbecaa2c20bde22e1dbeeba8beb758c" dependencies = [ "proc-macro2", "quote", @@ -3879,9 +4165,9 @@ dependencies = [ [[package]] name = "pin-project-lite" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" +checksum = "915a1e146535de9163f3987b8944ed8cf49a18bb0056bcebcdcece385cece4ff" [[package]] name = "pin-utils" @@ -3946,9 +4232,9 @@ checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" [[package]] name = "polling" -version = "3.7.3" +version = "3.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc2790cd301dec6cd3b7a025e4815cf825724a51c98dccfe6a3e55f05ffb6511" +checksum = "a604568c3202727d1507653cb121dbd627a58684eb09a820fd746bee38b4442f" dependencies = [ "cfg-if", "concurrent-queue", @@ -4023,13 +4309,32 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.87" +version = "1.0.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3e4daa0dcf6feba26f985457cdf104d4b4256fc5a09547140f3631bb076b19a" +checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" dependencies = [ "unicode-ident", ] +[[package]] +name = "profiling" +version = "1.0.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "afbdc74edc00b6f6a218ca6a5364d6226a259d4b8ea1af4a0ea063f27e179f4d" +dependencies = [ + "profiling-procmacros", +] + +[[package]] +name = "profiling-procmacros" +version = "1.0.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a65f2e60fbf1063868558d69c6beacf412dc755f9fc020f514b7955fc914fe30" +dependencies = [ + "quote", + "syn", +] + [[package]] name = "prost" version = "0.13.3" @@ -4055,9 +4360,9 @@ dependencies = [ [[package]] name = "pulldown-cmark" -version = "0.12.1" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "666f0f59e259aea2d72e6012290c09877a780935cc3c18b1ceded41f3890d59c" +checksum = "f86ba2052aebccc42cbbb3ed234b8b13ce76f75c3551a303cb2bcffcff12bb14" dependencies = [ "bitflags 2.6.0", "getopts", @@ -4081,6 +4386,12 @@ dependencies = [ "image", ] +[[package]] +name = "quick-error" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3" + [[package]] name = "quote" version = "1.0.37" @@ -4129,6 +4440,56 @@ dependencies = [ "rand_core", ] +[[package]] +name = "rav1e" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd87ce80a7665b1cce111f8a16c1f3929f6547ce91ade6addf4ec86a8dda5ce9" +dependencies = [ + "arbitrary", + "arg_enum_proc_macro", + "arrayvec", + "av1-grain", + "bitstream-io", + "built", + "cfg-if", + "interpolate_name", + "itertools 0.12.1", + "libc", + "libfuzzer-sys", + "log", + "maybe-rayon", + "new_debug_unreachable", + "noop_proc_macro", + "num-derive", + "num-traits", + "once_cell", + "paste", + "profiling", + "rand", + "rand_chacha", + "simd_helpers", + "system-deps 6.2.2", + "thiserror", + "v_frame", + "wasm-bindgen", +] + +[[package]] +name = "ravif" +version = "0.11.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2413fd96bd0ea5cdeeb37eaf446a22e6ed7b981d792828721e74ded1980a45c6" +dependencies = [ + "avif-serialize", + "imgref", + "loop9", + "quick-error", + "rav1e", + "rayon", + "rgb", +] + [[package]] name = "rayon" version = "1.10.0" @@ -4166,13 +4527,13 @@ dependencies = [ [[package]] name = "regex" -version = "1.11.0" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38200e5ee88914975b69f657f0801b6f6dccafd44fd9326302a4aaeecfacb1d8" +checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.8", + "regex-automata 0.4.9", "regex-syntax 0.8.5", ] @@ -4187,9 +4548,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.8" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "368758f23274712b504848e9d5a6f010445cc8b87a7cdb4d7cbee666c1288da3" +checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" dependencies = [ "aho-corasick", "memchr", @@ -4210,9 +4571,9 @@ checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "reqwest" -version = "0.12.8" +version = "0.12.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f713147fbe92361e52392c73b8c9e48c04c6625bce969ef54dc901e58e042a7b" +checksum = "a77c62af46e79de0a562e1a9849205ffcb7fc1238876e9bd743357570e04046f" dependencies = [ "async-compression", "base64", @@ -4237,7 +4598,7 @@ dependencies = [ "serde", "serde_json", "serde_urlencoded", - "sync_wrapper", + "sync_wrapper 1.0.2", "tokio", "tokio-native-tls", "tokio-socks", @@ -4251,6 +4612,12 @@ dependencies = [ "windows-registry", ] +[[package]] +name = "rgb" +version = "0.8.50" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57397d16646700483b67d2dd6511d79318f9d057fdbd21a4066aeac8b41d310a" + [[package]] name = "rmp" version = "0.8.14" @@ -4286,8 +4653,9 @@ dependencies = [ [[package]] name = "ruma" -version = "0.10.1" -source = "git+https://github.com/ruma/ruma.git?rev=26165b23fc2ae9928c5497a21db3d31f4b44cc2a#26165b23fc2ae9928c5497a21db3d31f4b44cc2a" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e94984418ae8a5e1160e6c87608141330e9ae26330abf22e3d15416efa96d48a" dependencies = [ "assign", "js_int", @@ -4303,8 +4671,9 @@ dependencies = [ [[package]] name = "ruma-client-api" -version = "0.18.0" -source = "git+https://github.com/ruma/ruma.git?rev=26165b23fc2ae9928c5497a21db3d31f4b44cc2a#26165b23fc2ae9928c5497a21db3d31f4b44cc2a" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "325e054db8d5545c00767d9868356d61e63f2c6cb8b54768346d66696ea4ad48" dependencies = [ "as_variant", "assign", @@ -4326,8 +4695,9 @@ dependencies = [ [[package]] name = "ruma-common" -version = "0.13.0" -source = "git+https://github.com/ruma/ruma.git?rev=26165b23fc2ae9928c5497a21db3d31f4b44cc2a#26165b23fc2ae9928c5497a21db3d31f4b44cc2a" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad71c7f49abaa047ba228339d34f9aaefa4d8b50ebeb8e859d0340cc2138bda8" dependencies = [ "as_variant", "base64", @@ -4358,8 +4728,9 @@ dependencies = [ [[package]] name = "ruma-events" -version = "0.28.1" -source = "git+https://github.com/ruma/ruma.git?rev=26165b23fc2ae9928c5497a21db3d31f4b44cc2a#26165b23fc2ae9928c5497a21db3d31f4b44cc2a" +version = "0.29.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be86dccf3504588c1f4dc1bda4ce1f8bbd646fc6dda40c77cc7de6e203e62dad" dependencies = [ "as_variant", "indexmap", @@ -4383,8 +4754,9 @@ dependencies = [ [[package]] name = "ruma-federation-api" -version = "0.9.0" -source = "git+https://github.com/ruma/ruma.git?rev=26165b23fc2ae9928c5497a21db3d31f4b44cc2a#26165b23fc2ae9928c5497a21db3d31f4b44cc2a" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b5a09ac22b3352bf7a350514dc9a87e1b56aba04c326ac9ce142740f7218afa" dependencies = [ "http", "js_int", @@ -4397,8 +4769,9 @@ dependencies = [ [[package]] name = "ruma-html" -version = "0.2.0" -source = "git+https://github.com/ruma/ruma.git?rev=26165b23fc2ae9928c5497a21db3d31f4b44cc2a#26165b23fc2ae9928c5497a21db3d31f4b44cc2a" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7571886b6df90a4ed72e7481a5a39cc2a5b3a4e956e9366ad798e4e2e9fe8005" dependencies = [ "as_variant", "html5ever", @@ -4410,8 +4783,9 @@ dependencies = [ [[package]] name = "ruma-identifiers-validation" -version = "0.9.5" -source = "git+https://github.com/ruma/ruma.git?rev=26165b23fc2ae9928c5497a21db3d31f4b44cc2a#26165b23fc2ae9928c5497a21db3d31f4b44cc2a" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e7f9b534a65698d7db3c08d94bf91de0046fe6c7893a7b360502f65e7011ac4" dependencies = [ "js_int", "thiserror", @@ -4419,8 +4793,9 @@ dependencies = [ [[package]] name = "ruma-macros" -version = "0.13.0" -source = "git+https://github.com/ruma/ruma.git?rev=26165b23fc2ae9928c5497a21db3d31f4b44cc2a#26165b23fc2ae9928c5497a21db3d31f4b44cc2a" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8d57d3cb20e8e758e8f7c5e408ce831d46758003b615100099852e468631934" dependencies = [ "cfg-if", "once_cell", @@ -4435,8 +4810,9 @@ dependencies = [ [[package]] name = "ruma-push-gateway-api" -version = "0.9.0" -source = "git+https://github.com/ruma/ruma.git?rev=26165b23fc2ae9928c5497a21db3d31f4b44cc2a#26165b23fc2ae9928c5497a21db3d31f4b44cc2a" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfced466fbed6277f74ac3887eeb96c185a09f4323dc3c39bcea04870430fe9a" dependencies = [ "js_int", "ruma-common", @@ -4482,9 +4858,9 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.37" +version = "0.38.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8acb788b847c24f28525660c4d7758620a7210875711f79e7f663cc152726811" +checksum = "d7f649912bc1495e167a6edee79151c84b1bad49748cb4f1f1167f459f6224f6" dependencies = [ "bitflags 2.6.0", "errno", @@ -4522,9 +4898,9 @@ checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" [[package]] name = "schannel" -version = "0.1.26" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01227be5826fa0690321a2ba6c5cd57a19cf3f6a09e76973b58e61de6ab9d1c1" +checksum = "1f29ebaa345f945cec9fbbc532eb307f0fdad8161f281b6369539c8d84876b3d" dependencies = [ "windows-sys 0.59.0", ] @@ -4559,9 +4935,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.12.0" +version = "2.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea4a292869320c0272d7bc55a5a6aafaff59b4f63404a003887b679a2e05b4b6" +checksum = "fa39c7303dc58b5543c94d22c1766b0d31f2ee58306363ea622b10bbc075eaa2" dependencies = [ "core-foundation-sys", "libc", @@ -4575,9 +4951,9 @@ checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" [[package]] name = "serde" -version = "1.0.210" +version = "1.0.215" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a" +checksum = "6513c1ad0b11a9376da888e3e0baa0077f1aed55c17f50e7b2397136129fb88f" dependencies = [ "serde_derive", ] @@ -4604,9 +4980,9 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.210" +version = "1.0.215" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" +checksum = "ad1e866f866923f252f05c889987993144fb74e722403468a4ebd70c3cd756c0" dependencies = [ "proc-macro2", "quote", @@ -4628,9 +5004,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.128" +version = "1.0.133" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ff5456707a1de34e7e37f2a6fd3d3f808c318259cbd01ab6377795054b483d8" +checksum = "c7fceb2473b9166b2294ef05efcb65a3db80803f0b03ef86a5fc88a2b85ee377" dependencies = [ "itoa", "memchr", @@ -4735,6 +5111,15 @@ dependencies = [ "rand_core", ] +[[package]] +name = "simd_helpers" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95890f873bec569a0362c235787f3aca6e1e887302ba4840839bcc6459c42da6" +dependencies = [ + "quote", +] + [[package]] name = "siphasher" version = "0.3.11" @@ -4817,6 +5202,12 @@ dependencies = [ "der", ] +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + [[package]] name = "static_assertions" version = "1.1.0" @@ -4885,9 +5276,9 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "syn" -version = "2.0.79" +version = "2.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89132cd0bf050864e1d38dc3bbc07a0eb8e7530af26344d3d2bbbef83499f590" +checksum = "44d46482f1c1c87acd84dea20c1bf5ebff4c757009ed6bf19cfd36fb10e92c4e" dependencies = [ "proc-macro2", "quote", @@ -4896,13 +5287,30 @@ dependencies = [ [[package]] name = "sync_wrapper" -version = "1.0.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" +checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" + +[[package]] +name = "sync_wrapper" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" dependencies = [ "futures-core", ] +[[package]] +name = "synstructure" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "system-deps" version = "6.2.2" @@ -4922,7 +5330,7 @@ version = "7.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "66d23aaf9f331227789a99e8de4c91bf46703add012bdfd45fdecdfb2975a005" dependencies = [ - "cfg-expr 0.17.0", + "cfg-expr 0.17.1", "heck", "pkg-config", "toml", @@ -4943,9 +5351,9 @@ checksum = "bc1ee6eef34f12f765cb94725905c6312b6610ab2b0940889cfe58dae7bc3c72" [[package]] name = "tempfile" -version = "3.13.0" +version = "3.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0f2c9fc62d0beef6951ccffd757e241266a2c833136efbe35af6cd2567dca5b" +checksum = "28cce251fcbc87fac86a866eeb0d6c2d536fc16d06f184bb61aeae11aa4cee0c" dependencies = [ "cfg-if", "fastrand", @@ -4967,18 +5375,18 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.64" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d50af8abc119fb8bb6dbabcfa89656f46f84aa0ac7688088608076ad2b459a84" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.64" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08904e7672f5eb876eaaf87e0ce17857500934f4981c4a0ab2b4aa98baac7fc3" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", @@ -5026,6 +5434,16 @@ dependencies = [ "time-core", ] +[[package]] +name = "tinystr" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" +dependencies = [ + "displaydoc", + "zerovec", +] + [[package]] name = "tinyvec" version = "1.8.0" @@ -5053,9 +5471,9 @@ dependencies = [ [[package]] name = "tokio" -version = "1.40.0" +version = "1.41.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2b070231665d27ad9ec9b8df639893f46727666c6767db40317fbe920a5d998" +checksum = "22cfb5bee7a6a52939ca9224d6ac897bb669134078daa8735560897f69de4d33" dependencies = [ "backtrace", "bytes", @@ -5171,6 +5589,21 @@ dependencies = [ "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", @@ -5302,24 +5735,15 @@ dependencies = [ [[package]] name = "unicase" -version = "2.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7d2d4dafb69621809a81864c9c1b864479e1235c0dd4e199924b9742439ed89" -dependencies = [ - "version_check", -] - -[[package]] -name = "unicode-bidi" -version = "0.3.17" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ab17db44d7388991a428b2ee655ce0c212e862eff1768a455c58f9aad6e7893" +checksum = "7e51b68083f157f853b6379db119d1c1be0e6e4dec98101079dec41f6f5cf6df" [[package]] name = "unicode-ident" -version = "1.0.13" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" +checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83" [[package]] name = "unicode-normalization" @@ -5354,9 +5778,9 @@ dependencies = [ [[package]] name = "url" -version = "2.5.2" +version = "2.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" +checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" dependencies = [ "form_urlencoded", "idna", @@ -5376,16 +5800,39 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" +[[package]] +name = "utf16_iter" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + [[package]] name = "uuid" -version = "1.10.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81dfa00651efa65069b0b6b651f4aaa31ba9e3c3ce0137aaad053604ee7e0314" +checksum = "f8c5f0a0af699448548ad1a2fbf920fb4bee257eae39953ba95cb84891a0446a" dependencies = [ "getrandom", "wasm-bindgen", ] +[[package]] +name = "v_frame" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6f32aaa24bacd11e488aa9ba66369c7cd514885742c9fe08cfe85884db3e92b" +dependencies = [ + "aligned-vec", + "num-traits", + "wasm-bindgen", +] + [[package]] name = "valuable" version = "0.1.0" @@ -5524,9 +5971,9 @@ checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d" [[package]] name = "wasm-streams" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e072d4e72f700fb3443d8fe94a39315df013eef1104903cdb0a2abd322bbecd" +checksum = "15053d8d85c7eccdbefef60f06769760a563c7f0a9d6902a13d35c7800b0ad65" dependencies = [ "futures-util", "js-sys", @@ -5723,6 +6170,18 @@ dependencies = [ "memchr", ] +[[package]] +name = "write16" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" + +[[package]] +name = "writeable" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" + [[package]] name = "x25519-dalek" version = "2.0.1" @@ -5771,6 +6230,30 @@ dependencies = [ "pkg-config", ] +[[package]] +name = "yoke" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c5b1314b079b0930c31e3af543d8ee1757b1951ae1e1565ec704403a7240ca5" +dependencies = [ + "serde", + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28cc31741b18cb6f1d5ff12f5b7523e3d6eb0852bbbad19d73905511d9849b95" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "synstructure", +] + [[package]] name = "zbus" version = "4.4.0" @@ -5849,6 +6332,27 @@ dependencies = [ "syn", ] +[[package]] +name = "zerofrom" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91ec111ce797d0e0784a1116d0ddcdbea84322cd79e5d5ad173daeba4f93ab55" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ea7b4a3637ea8669cedf0f1fd5c286a17f3de97b8dd5a70a6c167a1730e63a5" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "synstructure", +] + [[package]] name = "zeroize" version = "1.8.1" @@ -5869,6 +6373,28 @@ dependencies = [ "syn", ] +[[package]] +name = "zerovec" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "zvariant" version = "4.2.0" diff --git a/Cargo.toml b/Cargo.toml index 1e07b90b..51375c65 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -67,7 +67,7 @@ sourceview = { package = "sourceview5", version = "0.9" } [dependencies.matrix-sdk] git = "https://github.com/matrix-org/matrix-rust-sdk.git" -rev = "ee4ef2eb539f25d69ea3582a80646e467adceafd" +rev = "e55a1c7e00d2693d87d798f09852161d5cbf0495" features = [ "socks", "sso-login", @@ -77,16 +77,16 @@ features = [ [dependencies.matrix-sdk-ui] git = "https://github.com/matrix-org/matrix-rust-sdk.git" -rev = "ee4ef2eb539f25d69ea3582a80646e467adceafd" +rev = "e55a1c7e00d2693d87d798f09852161d5cbf0495" [dependencies.ruma] -# version = "0.10" -git = "https://github.com/ruma/ruma.git" -rev = "26165b23fc2ae9928c5497a21db3d31f4b44cc2a" +version = "0.11" +# git = "https://github.com/ruma/ruma.git" +# rev = "26165b23fc2ae9928c5497a21db3d31f4b44cc2a" features = [ "unstable-unspecified", "client-api-c", - "compat-key-id", + "compat-server-signing-key-version", "compat-user-id", "compat-empty-string-null", "compat-null", diff --git a/src/prelude.rs b/src/prelude.rs index 0df677dd..b069ffd5 100644 --- a/src/prelude.rs +++ b/src/prelude.rs @@ -8,7 +8,7 @@ pub use crate::{ session_list::SessionInfoExt, user_facing_error::UserFacingError, utils::{ - matrix::AtMentionExt, + matrix::ext_traits::*, string::{StrExt, StrMutExt}, LocationExt, }, diff --git a/src/session/model/room/event/mod.rs b/src/session/model/room/event/mod.rs index bd5fbe07..07807ef3 100644 --- a/src/session/model/room/event/mod.rs +++ b/src/session/model/room/event/mod.rs @@ -1,10 +1,8 @@ -use std::{borrow::Cow, fmt}; - use gtk::{gio, glib, glib::closure_local, prelude::*, subclass::prelude::*}; use indexmap::IndexMap; use matrix_sdk_ui::timeline::{ AnyOtherFullStateEventContent, Error as TimelineError, EventSendState, EventTimelineItem, - RepliedToEvent, TimelineDetails, TimelineItemContent, + RepliedToEvent, TimelineDetails, TimelineEventItemId, TimelineItemContent, TimelineUniqueId, }; use ruma::{ events::{ @@ -13,7 +11,7 @@ use ruma::{ AnySyncTimelineEvent, Mentions, TimelineEventType, }, serde::Raw, - EventId, MatrixToUri, MatrixUri, MilliSecondsSinceUnixEpoch, OwnedEventId, OwnedTransactionId, + MatrixToUri, MatrixUri, MilliSecondsSinceUnixEpoch, OwnedEventId, OwnedTransactionId, OwnedUserId, }; use serde::{de::IgnoredAny, Deserialize}; @@ -36,51 +34,6 @@ use crate::{ utils::matrix::{raw_eq, MediaMessage, VisualMediaMessage}, }; -/// The unique key to identify an event in a room. -#[derive(Clone, Debug, PartialEq, Eq, Hash)] -pub enum EventKey { - /// This is the local echo of the event, the key is its transaction ID. - TransactionId(OwnedTransactionId), - - /// This is the remote echo of the event, the key is its event ID. - EventId(OwnedEventId), -} - -impl fmt::Display for EventKey { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - match self { - EventKey::TransactionId(txn_id) => write!(f, "transaction_id:{txn_id}"), - EventKey::EventId(event_id) => write!(f, "event_id:{event_id}"), - } - } -} - -impl StaticVariantType for EventKey { - fn static_variant_type() -> Cow<'static, glib::VariantTy> { - Cow::Borrowed(glib::VariantTy::STRING) - } -} - -impl ToVariant for EventKey { - fn to_variant(&self) -> glib::Variant { - self.to_string().to_variant() - } -} - -impl FromVariant for EventKey { - fn from_variant(variant: &glib::Variant) -> Option { - let s = variant.str()?; - - if let Some(s) = s.strip_prefix("transaction_id:") { - Some(EventKey::TransactionId(s.into())) - } else if let Some(s) = s.strip_prefix("event_id:") { - EventId::parse(s).ok().map(EventKey::EventId) - } else { - None - } - } -} - #[derive(Debug, Default, Hash, Eq, PartialEq, Clone, Copy, glib::Enum)] #[enum_type(name = "MessageState")] pub enum MessageState { @@ -147,9 +100,8 @@ mod imp { /// server, as a string. #[property(get = Self::event_id_string)] pub event_id_string: PhantomData>, - /// The ID of this `Event` in the SDK timeline. - #[property(get = Self::timeline_id, type = String)] - pub timeline_id: RefCell>, + /// The unique local ID of this `Event` in the SDK timeline. + timeline_id: RefCell>, /// The ID of the sender of this `Event`, as a string. #[property(get = Self::sender_id_string)] pub sender_id_string: PhantomData, @@ -227,7 +179,7 @@ mod imp { impl TimelineItemImpl for Event { fn id(&self) -> String { - format!("Event::{}", self.obj().key()) + format!("Event::{:?}", self.identifier()) } fn can_hide_header(&self) -> bool { @@ -245,7 +197,7 @@ mod imp { impl Event { /// Set the underlying SDK timeline item of this `Event`. - pub fn set_item(&self, item: EventTimelineItem, timeline_id: &str) { + pub fn set_item(&self, item: EventTimelineItem, timeline_id: TimelineUniqueId) { let obj = self.obj(); let prev_raw = self.raw(); @@ -259,7 +211,7 @@ mod imp { obj.update_read_receipts(item.read_receipts()); self.item.replace(Some(item)); - self.timeline_id.replace(Some(timeline_id.to_owned())); + self.timeline_id.replace(Some(timeline_id)); if !raw_eq(prev_raw.as_ref(), self.raw().as_ref()) { obj.notify_source(); @@ -288,7 +240,6 @@ mod imp { obj.update_state(); obj.emit_by_name::<()>("item-changed", &[]); - obj.notify_timeline_id(); } /// The raw JSON source for this `Event`, if it has been echoed back @@ -325,14 +276,23 @@ mod imp { .map(ToString::to_string) } - /// The ID of this `Event` in the SDK timeline. - fn timeline_id(&self) -> String { + /// The unique local ID of this `Event` in the SDK timeline. + pub(super) fn timeline_id(&self) -> TimelineUniqueId { self.timeline_id .borrow() .clone() .expect("event should always have timeline ID after construction") } + /// The unique global key of this `Event` in the timeline. + pub(super) fn identifier(&self) -> TimelineEventItemId { + self.item + .borrow() + .as_ref() + .expect("event should always have item after construction") + .identifier() + } + /// The ID of the sender of this `Event`, as a string. fn sender_id_string(&self) -> String { self.item @@ -463,12 +423,12 @@ glib::wrapper! { impl Event { /// Create a new `Event` with the given SDK timeline item. - pub fn new(item: EventTimelineItem, timeline_id: &str, room: &Room) -> Self { + pub fn new(item: EventTimelineItem, timeline_id: &TimelineUniqueId, room: &Room) -> Self { let obj = glib::Object::builder::() .property("room", room) .build(); - obj.imp().set_item(item, timeline_id); + obj.imp().set_item(item, timeline_id.clone()); obj } @@ -476,18 +436,22 @@ impl Event { /// Try to update this `Event` with the given SDK timeline item. /// /// Returns `true` if the update succeeded. - pub fn try_update_with(&self, item: &EventTimelineItem, timeline_id: &str) -> bool { - match &self.key() { - EventKey::TransactionId(txn_id) + pub fn try_update_with( + &self, + item: &EventTimelineItem, + timeline_id: &TimelineUniqueId, + ) -> bool { + match &self.identifier() { + TimelineEventItemId::TransactionId(txn_id) if item.is_local_echo() && item.transaction_id() == Some(txn_id) => { - self.imp().set_item(item.clone(), timeline_id); + self.imp().set_item(item.clone(), timeline_id.clone()); return true; } - EventKey::EventId(event_id) + TimelineEventItemId::EventId(event_id) if !item.is_local_echo() && item.event_id() == Some(event_id) => { - self.imp().set_item(item.clone(), timeline_id); + self.imp().set_item(item.clone(), timeline_id.clone()); return true; } _ => {} @@ -507,43 +471,46 @@ impl Event { self.imp().raw() } - /// The unique key of this `Event` in the timeline. - pub fn key(&self) -> EventKey { - let item_ref = self.imp().item.borrow(); - let item = item_ref.as_ref().unwrap(); - if item.is_local_echo() { - EventKey::TransactionId(item.transaction_id().unwrap().to_owned()) - } else { - EventKey::EventId(item.event_id().unwrap().to_owned()) - } + /// The unique local ID of this `Event` in the SDK timeline. + pub fn timeline_id(&self) -> TimelineUniqueId { + self.imp().timeline_id() } - /// Whether the given key matches this `Event`. + /// The unique global identifier of this `Event` in the timeline. + pub fn identifier(&self) -> TimelineEventItemId { + self.imp().identifier() + } + + /// Whether the given identifier matches this `Event`. /// /// The result can be different from comparing two `EventKey`s because an /// event can have a transaction ID and an event ID. - pub fn matches_key(&self, key: &EventKey) -> bool { + pub fn matches_identifier(&self, identifier: &TimelineEventItemId) -> bool { let item_ref = self.imp().item.borrow(); let item = item_ref.as_ref().unwrap(); - match key { - EventKey::TransactionId(txn_id) => item.transaction_id().is_some_and(|id| id == txn_id), - EventKey::EventId(event_id) => item.event_id().is_some_and(|id| id == event_id), + match identifier { + TimelineEventItemId::TransactionId(txn_id) => { + item.transaction_id().is_some_and(|id| id == txn_id) + } + TimelineEventItemId::EventId(event_id) => { + item.event_id().is_some_and(|id| id == event_id) + } } } /// The event ID of this `Event`, if it has been received from the server. pub fn event_id(&self) -> Option { - match self.key() { - EventKey::TransactionId(_) => None, - EventKey::EventId(event_id) => Some(event_id), + match self.identifier() { + TimelineEventItemId::TransactionId(_) => None, + TimelineEventItemId::EventId(event_id) => Some(event_id), } } /// The transaction ID of this `Event`, if it is still pending. pub fn transaction_id(&self) -> Option { - match self.key() { - EventKey::TransactionId(txn_id) => Some(txn_id), - EventKey::EventId(_) => None, + match self.identifier() { + TimelineEventItemId::TransactionId(txn_id) => Some(txn_id), + TimelineEventItemId::EventId(_) => None, } } @@ -774,7 +741,7 @@ impl Event { let event_id = self.reply_to_id()?; self.room() .timeline() - .event_by_key(&EventKey::EventId(event_id)) + .event_by_identifier(&TimelineEventItemId::EventId(event_id)) } /// Fetch missing details for this event. diff --git a/src/session/model/room/mod.rs b/src/session/model/room/mod.rs index 93111bab..c7328cfe 100644 --- a/src/session/model/room/mod.rs +++ b/src/session/model/room/mod.rs @@ -10,8 +10,8 @@ use gtk::{ }; use matrix_sdk::{ deserialized_responses::AmbiguityChange, event_handler::EventHandlerDropGuard, - room::Room as MatrixRoom, send_queue::RoomSendQueueUpdate, DisplayName, Result as MatrixResult, - RoomInfo, RoomMemberships, RoomState, + room::Room as MatrixRoom, send_queue::RoomSendQueueUpdate, Result as MatrixResult, + RoomDisplayName, RoomInfo, RoomMemberships, RoomState, }; use ruma::{ api::client::{ @@ -377,17 +377,17 @@ mod imp { let mut display_name = if let Some(sdk_display_name) = sdk_display_name { match sdk_display_name { - DisplayName::Named(s) - | DisplayName::Calculated(s) - | DisplayName::Aliased(s) => s, - // Translators: This is the name of a room that is empty but had another - // user before. Do NOT translate the content between - // '{' and '}', this is a variable name. - DisplayName::EmptyWas(s) => { + RoomDisplayName::Named(s) + | RoomDisplayName::Calculated(s) + | RoomDisplayName::Aliased(s) => s, + RoomDisplayName::EmptyWas(s) => { + // Translators: This is the name of a room that is empty but had another + // user before. Do NOT translate the content between + // '{' and '}', this is a variable name. gettext_f("Empty Room (was {user})", &[("user", &s)]) } // Translators: This is the name of a room without other users. - DisplayName::Empty => gettext("Empty Room"), + RoomDisplayName::Empty => gettext("Empty Room"), } } else { Default::default() @@ -1702,10 +1702,9 @@ impl Room { /// Toggle the `key` reaction on the given related event in this room. pub async fn toggle_reaction(&self, key: String, event: &Event) -> Result<(), ()> { let timeline = self.timeline().matrix_timeline(); - let event_timeline_id = event.timeline_id(); + let identifier = event.identifier(); - let handle = - spawn_tokio!(async move { timeline.toggle_reaction(&event_timeline_id, &key).await }); + let handle = spawn_tokio!(async move { timeline.toggle_reaction(&identifier, &key).await }); if let Err(error) = handle.await.expect("task was not aborted") { error!("Could not toggle reaction: {error}"); diff --git a/src/session/model/room/permissions.rs b/src/session/model/room/permissions.rs index 04a86d80..dd6af369 100644 --- a/src/session/model/room/permissions.rs +++ b/src/session/model/room/permissions.rs @@ -203,7 +203,7 @@ mod imp { let matrix_room = room.matrix_room(); let matrix_room_clone = matrix_room.clone(); - let handle = spawn_tokio!(async move { matrix_room_clone.room_power_levels().await }); + let handle = spawn_tokio!(async move { matrix_room_clone.power_levels().await }); match handle.await.expect("task was not aborted") { Ok(power_levels) => self.update_power_levels(&power_levels), diff --git a/src/session/model/room/timeline/mod.rs b/src/session/model/room/timeline/mod.rs index 6d61e803..4f0a81d7 100644 --- a/src/session/model/room/timeline/mod.rs +++ b/src/session/model/room/timeline/mod.rs @@ -13,7 +13,8 @@ use gtk::{ use matrix_sdk_ui::{ eyeball_im::VectorDiff, timeline::{ - default_event_filter, RoomExt, Timeline as SdkTimeline, TimelineItem as SdkTimelineItem, + default_event_filter, RoomExt, Timeline as SdkTimeline, TimelineEventItemId, + TimelineItem as SdkTimelineItem, }, }; use ruma::{ @@ -30,7 +31,7 @@ pub use self::{ timeline_item::{TimelineItem, TimelineItemExt, TimelineItemImpl}, virtual_item::{VirtualItem, VirtualItemKind}, }; -use super::{Event, EventKey, Room}; +use super::{Event, Room}; use crate::{prelude::*, spawn, spawn_tokio}; /// The possible states of the timeline. @@ -82,8 +83,9 @@ mod imp { /// The `GListModel` containing all the timeline items. #[property(get)] items: gtk::FlattenListModel, - /// A Hashmap linking `EventKey` to corresponding `Event` - pub(super) event_map: RefCell>, + /// A Hashmap linking a `TimelineEventItemId` to the corresponding + /// `Event`. + pub(super) event_map: RefCell>, /// The state of the timeline. #[property(get, builder(TimelineState::default()))] state: Cell, @@ -464,7 +466,7 @@ mod imp { if let Some(event) = item.downcast_ref::() { self.event_map .borrow_mut() - .insert(event.key(), event.clone()); + .insert(event.identifier(), event.clone()); // Keep track of the activity of the sender. if event.counts_as_unread() { @@ -485,7 +487,7 @@ mod imp { /// Remove the given item from this `Timeline`. fn remove_item(&self, item: &TimelineItem) { if let Some(event) = item.downcast_ref::() { - self.event_map.borrow_mut().remove(&event.key()); + self.event_map.borrow_mut().remove(&event.identifier()); if event.is_room_create_event() { self.set_has_room_create(false); @@ -666,16 +668,17 @@ impl Timeline { } } - /// Get the event with the given key from this `Timeline`. + /// Get the event with the given identifier from this `Timeline`. /// /// Use this method if you are sure the event has already been received. /// Otherwise use `fetch_event_by_id`. - pub(crate) fn event_by_key(&self, key: &EventKey) -> Option { - self.imp().event_map.borrow().get(key).cloned() + pub(crate) fn event_by_identifier(&self, identifier: &TimelineEventItemId) -> Option { + self.imp().event_map.borrow().get(identifier).cloned() } - /// Get the position of the event with the given key in this `Timeline`. - pub(crate) fn find_event_position(&self, key: &EventKey) -> Option { + /// Get the position of the event with the given identifier in this + /// `Timeline`. + pub(crate) fn find_event_position(&self, identifier: &TimelineEventItemId) -> Option { for (pos, item) in self .items() .iter::() @@ -687,7 +690,7 @@ impl Timeline { }; if let Some(event) = item.downcast_ref::() { - if event.key() == *key { + if event.identifier() == *identifier { return Some(pos); } } diff --git a/src/session/model/session.rs b/src/session/model/session.rs index 1e678992..15ed0ebf 100644 --- a/src/session/model/session.rs +++ b/src/session/model/session.rs @@ -321,7 +321,7 @@ impl Session { spawn_tokio!(async move { client .send_queue() - .respawn_tasks_for_rooms_with_unsent_events() + .respawn_tasks_for_rooms_with_unsent_requests() .await; }); diff --git a/src/session/model/verification/identity_verification.rs b/src/session/model/verification/identity_verification.rs index c179a0e3..9928f073 100644 --- a/src/session/model/verification/identity_verification.rs +++ b/src/session/model/verification/identity_verification.rs @@ -431,24 +431,25 @@ impl IdentityVerification { /// The ID of the other device that is being verified. pub fn other_device_id(&self) -> Option { - let verification = match self.request().state() { + let request_state = self.request().state(); + let other_device_data = match &request_state { VerificationRequestState::Requested { - other_device_id, .. + other_device_data, .. } | VerificationRequestState::Ready { - other_device_id, .. - } => return Some(other_device_id), - VerificationRequestState::Transitioned { verification } => verification, + other_device_data, .. + } => other_device_data, + VerificationRequestState::Transitioned { verification } => match verification { + Verification::SasV1(sas) => sas.other_device(), + Verification::QrV1(qr) => qr.other_device(), + _ => None?, + }, VerificationRequestState::Created { .. } | VerificationRequestState::Done - | VerificationRequestState::Cancelled(_) => return None, + | VerificationRequestState::Cancelled(_) => None?, }; - match verification { - Verification::SasV1(sas) => Some(sas.other_device().device_id().to_owned()), - Verification::QrV1(qr) => Some(qr.other_device().device_id().to_owned()), - _ => None, - } + Some(other_device_data.device_id().to_owned()) } /// Set whether this request was accepted. diff --git a/src/session/view/account_settings/general_page/mod.rs b/src/session/view/account_settings/general_page/mod.rs index 4baea890..811cc8b7 100644 --- a/src/session/view/account_settings/general_page/mod.rs +++ b/src/session/view/account_settings/general_page/mod.rs @@ -237,7 +237,7 @@ impl GeneralPage { let client = session.client(); let client_clone = client.clone(); let handle = - spawn_tokio!(async move { client_clone.media().upload(&info.mime, data).await }); + spawn_tokio!(async move { client_clone.media().upload(&info.mime, data, None).await }); let uri = match handle.await.unwrap() { Ok(res) => res.content_uri, diff --git a/src/session/view/content/room_details/edit_details_subpage.rs b/src/session/view/content/room_details/edit_details_subpage.rs index 2414c7f0..f40d1cbb 100644 --- a/src/session/view/content/room_details/edit_details_subpage.rs +++ b/src/session/view/content/room_details/edit_details_subpage.rs @@ -195,7 +195,8 @@ mod imp { return; }; let client = session.client(); - let handle = spawn_tokio!(async move { client.media().upload(&info.mime, data).await }); + let handle = + spawn_tokio!(async move { client.media().upload(&info.mime, data, None).await }); let uri = match handle.await.unwrap() { Ok(res) => res.content_uri, diff --git a/src/session/view/content/room_history/item_row.rs b/src/session/view/content/room_history/item_row.rs index 01ddc24f..0257d600 100644 --- a/src/session/view/content/room_history/item_row.rs +++ b/src/session/view/content/room_history/item_row.rs @@ -3,7 +3,7 @@ use std::sync::LazyLock; use adw::{prelude::*, subclass::prelude::*}; use gettextrs::gettext; use gtk::{gio, glib, glib::clone}; -use matrix_sdk_ui::timeline::TimelineItemContent; +use matrix_sdk_ui::timeline::{TimelineEventItemId, TimelineItemContent}; use ruma::events::room::message::MessageType; use tracing::error; @@ -12,7 +12,7 @@ use crate::{ components::{ContextMenuBin, ContextMenuBinExt, ContextMenuBinImpl}, prelude::*, session::{ - model::{Event, EventKey, MessageState, Room, TimelineItem, VirtualItem, VirtualItemKind}, + model::{Event, MessageState, Room, TimelineItem, VirtualItem, VirtualItemKind}, view::{content::room_history::message_toolbar::ComposerState, EventDetailsDialog}, }, spawn, spawn_tokio, toast, @@ -222,14 +222,22 @@ mod imp { obj, move |composer_state| { obj.update_for_related_event( - composer_state.related_to().map(|i| i.key()).as_ref(), + composer_state + .related_to() + .map(|info| info.identifier()) + .as_ref(), ); } )); self.composer_state .set(composer_state, vec![composer_state_handler]); - obj.update_for_related_event(composer_state.related_to().map(|i| i.key()).as_ref()); + obj.update_for_related_event( + composer_state + .related_to() + .map(|info| info.identifier()) + .as_ref(), + ); } /// Set the [`TimelineItem`] presented by this row. @@ -483,11 +491,13 @@ impl ItemRow { emoji_chooser.popup(); } - /// Update this row for the related event with the given key. - fn update_for_related_event(&self, related_event_id: Option<&EventKey>) { + /// Update this row for the related event with the given identifier. + fn update_for_related_event(&self, related_event_id: Option<&TimelineEventItemId>) { let event = self.item().and_downcast::(); - if event.is_some_and(|event| related_event_id.is_some_and(|key| event.matches_key(key))) { + if event.is_some_and(|event| { + related_event_id.is_some_and(|identifier| event.matches_identifier(identifier)) + }) { self.add_css_class("selected"); } else { self.remove_css_class("selected"); @@ -979,8 +989,8 @@ impl ItemRow { }; let matrix_timeline = event.room().timeline().matrix_timeline(); - let event_item = event.item(); - let handle = spawn_tokio!(async move { matrix_timeline.redact(&event_item, None).await }); + let identifier = event.identifier(); + let handle = spawn_tokio!(async move { matrix_timeline.redact(&identifier, None).await }); if let Err(error) = handle.await.unwrap() { error!("Could not discard local event: {error}"); diff --git a/src/session/view/content/room_history/message_toolbar/composer_state.rs b/src/session/view/content/room_history/message_toolbar/composer_state.rs index b80da58e..cb2a4480 100644 --- a/src/session/view/content/room_history/message_toolbar/composer_state.rs +++ b/src/session/view/content/room_history/message_toolbar/composer_state.rs @@ -5,7 +5,7 @@ use gtk::{ subclass::prelude::*, }; use matrix_sdk::{ComposerDraft, ComposerDraftType}; -use matrix_sdk_ui::timeline::{Message, RepliedToInfo}; +use matrix_sdk_ui::timeline::{Message, RepliedToInfo, TimelineEventItemId}; use ruma::{ events::room::message::{MessageFormat, MessageType}, OwnedEventId, RoomOrAliasId, UserId, @@ -17,7 +17,7 @@ use super::{MessageBufferChunk, MessageBufferParser}; use crate::{ components::{AtRoom, Pill, PillSource}, prelude::*, - session::model::{EventKey, Member, Room}, + session::model::{Member, Room}, spawn, spawn_tokio, utils::matrix::{find_at_room, find_html_mentions, AT_ROOM}, }; @@ -569,11 +569,11 @@ pub enum RelationInfo { } impl RelationInfo { - /// The unique key of the related event. - pub fn key(&self) -> EventKey { + /// The unique global identifier of the related event. + pub fn identifier(&self) -> TimelineEventItemId { match self { - RelationInfo::Reply(info) => EventKey::EventId(info.event_id().to_owned()), - RelationInfo::Edit(event_id) => EventKey::EventId(event_id.clone()), + RelationInfo::Reply(info) => TimelineEventItemId::EventId(info.event_id().to_owned()), + RelationInfo::Edit(event_id) => TimelineEventItemId::EventId(event_id.clone()), } } diff --git a/src/session/view/content/room_history/message_toolbar/mod.rs b/src/session/view/content/room_history/message_toolbar/mod.rs index 1796c1f7..67eeb219 100644 --- a/src/session/view/content/room_history/message_toolbar/mod.rs +++ b/src/session/view/content/room_history/message_toolbar/mod.rs @@ -554,7 +554,8 @@ impl MessageToolbar { let handle = spawn_tokio!(async move { let full_content = matrix_room .make_edit_event(&event_id, EditedContent::RoomMessage(content)) - .await?; + .await + .map_err(matrix_sdk_ui::timeline::EditError::from)?; let send_queue = matrix_room.send_queue(); send_queue.send(full_content).await?; Ok::<(), matrix_sdk_ui::timeline::Error>(()) @@ -1014,7 +1015,7 @@ impl MessageToolbar { if let Some(related_to) = self.current_composer_state().related_to() { self.activate_action( "room-history.scroll-to-event", - Some(&related_to.key().to_variant()), + Some(&related_to.identifier().to_variant()), ) .unwrap(); } diff --git a/src/session/view/content/room_history/mod.rs b/src/session/view/content/room_history/mod.rs index 810540dd..3283e97f 100644 --- a/src/session/view/content/room_history/mod.rs +++ b/src/session/view/content/room_history/mod.rs @@ -16,6 +16,7 @@ use adw::{prelude::*, subclass::prelude::*}; use gettextrs::gettext; use gtk::{gdk, gio, glib, glib::clone, graphene::Point, CompositeTemplate}; use matrix_sdk::ruma::EventId; +use matrix_sdk_ui::timeline::TimelineEventItemId; use ruma::{api::client::receipt::create_receipt::v3::ReceiptType, OwnedEventId}; use tracing::{error, warn}; @@ -30,8 +31,7 @@ use crate::{ components::{confirm_leave_room_dialog, DragOverlay, QuickReactionChooser}, prelude::*, session::model::{ - Event, EventKey, MemberList, Membership, ReceiptPosition, Room, RoomCategory, Timeline, - TimelineState, + Event, MemberList, Membership, ReceiptPosition, Room, RoomCategory, Timeline, TimelineState, }, spawn, toast, utils::{template_callbacks::TemplateCallbacks, BoundObject}, @@ -157,9 +157,9 @@ mod imp { klass.install_action( "room-history.scroll-to-event", - Some(&EventKey::static_variant_type()), + Some(&TimelineEventItemId::static_variant_type()), |obj, _, v| { - if let Some(event_key) = v.and_then(EventKey::from_variant) { + if let Some(event_key) = v.and_then(TimelineEventItemId::from_variant) { obj.imp().scroll_to_event(&event_key); } }, @@ -176,7 +176,8 @@ mod imp { if let Some(event) = obj .room() .and_then(|room| { - room.timeline().event_by_key(&EventKey::EventId(event_id)) + room.timeline() + .event_by_identifier(&TimelineEventItemId::EventId(event_id)) }) .and_downcast_ref() { @@ -197,7 +198,8 @@ mod imp { if let Some(event) = obj .room() .and_then(|room| { - room.timeline().event_by_key(&EventKey::EventId(event_id)) + room.timeline() + .event_by_identifier(&TimelineEventItemId::EventId(event_id)) }) .and_downcast_ref() { @@ -677,8 +679,8 @@ mod imp { )); } - /// Scroll to the event with the given key. - fn scroll_to_event(&self, key: &EventKey) { + /// Scroll to the event with the given identifier. + fn scroll_to_event(&self, key: &TimelineEventItemId) { let Some(room) = self.room.obj() else { return; }; diff --git a/src/utils/matrix/ext_traits.rs b/src/utils/matrix/ext_traits.rs new file mode 100644 index 00000000..55b258f6 --- /dev/null +++ b/src/utils/matrix/ext_traits.rs @@ -0,0 +1,73 @@ +//! Extension traits for Matrix types. + +use std::borrow::Cow; + +use gtk::{glib, prelude::*}; +use matrix_sdk_ui::timeline::{Message, TimelineEventItemId, TimelineItemContent}; + +/// Helper trait for types possibly containing an `@room` mention. +pub trait AtMentionExt { + /// Whether this event might contain an `@room` mention. + /// + /// This means that either it doesn't have intentional mentions, or it has + /// intentional mentions and `room` is set to `true`. + fn can_contain_at_room(&self) -> bool; +} + +impl AtMentionExt for TimelineItemContent { + fn can_contain_at_room(&self) -> bool { + match self { + TimelineItemContent::Message(msg) => msg.can_contain_at_room(), + _ => false, + } + } +} + +impl AtMentionExt for Message { + fn can_contain_at_room(&self) -> bool { + let Some(mentions) = self.mentions() else { + return true; + }; + + mentions.room + } +} + +/// Extension trait for [`TimelineEventItemId`]. +pub trait TimelineEventItemIdExt: Sized { + /// The type used to represent a [`TimelineEventItemId`] as a `GVariant`. + fn static_variant_type() -> Cow<'static, glib::VariantTy>; + + /// Convert this [`TimelineEventItemId`] to a `GVariant`. + fn to_variant(&self) -> glib::Variant; + + /// Try to convert a `GVariant` to a [`TimelineEventItemId`]. + fn from_variant(variant: &glib::Variant) -> Option; +} + +impl TimelineEventItemIdExt for TimelineEventItemId { + fn static_variant_type() -> Cow<'static, glib::VariantTy> { + Cow::Borrowed(glib::VariantTy::STRING) + } + + fn to_variant(&self) -> glib::Variant { + let s = match self { + Self::TransactionId(txn_id) => format!("transaction_id:{txn_id}"), + Self::EventId(event_id) => format!("event_id:{event_id}"), + }; + + s.to_variant() + } + + fn from_variant(variant: &glib::Variant) -> Option { + let s = variant.str()?; + + if let Some(s) = s.strip_prefix("transaction_id:") { + Some(Self::TransactionId(s.into())) + } else if let Some(s) = s.strip_prefix("event_id:") { + s.try_into().ok().map(Self::EventId) + } else { + None + } + } +} diff --git a/src/utils/matrix/mod.rs b/src/utils/matrix/mod.rs index 2e0bc426..ff225e2c 100644 --- a/src/utils/matrix/mod.rs +++ b/src/utils/matrix/mod.rs @@ -11,7 +11,6 @@ use matrix_sdk::{ matrix_auth::{MatrixSession, MatrixSessionTokens}, Client, ClientBuildError, SessionMeta, }; -use matrix_sdk_ui::timeline::{Message, TimelineItemContent}; use ruma::{ events::{ room::{member::MembershipState, message::MessageType}, @@ -29,6 +28,7 @@ use ruma::{ }; use thiserror::Error; +pub mod ext_traits; mod media_message; pub use self::media_message::{MediaMessage, VisualMediaMessage}; @@ -652,31 +652,3 @@ pub enum MatrixIdUriParseError { #[error("unsupported Matrix ID: {0:?}")] UnsupportedId(MatrixId), } - -/// Helper trait for types possibly containing an `@room` mention. -pub trait AtMentionExt { - /// Whether this event might contain an `@room` mention. - /// - /// This means that either it doesn't have intentional mentions, or it has - /// intentional mentions and `room` is set to `true`. - fn can_contain_at_room(&self) -> bool; -} - -impl AtMentionExt for TimelineItemContent { - fn can_contain_at_room(&self) -> bool { - match self { - TimelineItemContent::Message(msg) => msg.can_contain_at_room(), - _ => false, - } - } -} - -impl AtMentionExt for Message { - fn can_contain_at_room(&self) -> bool { - let Some(mentions) = self.mentions() else { - return true; - }; - - mentions.room - } -} diff --git a/src/utils/media/image/mod.rs b/src/utils/media/image/mod.rs index 858e082f..0cf5171a 100644 --- a/src/utils/media/image/mod.rs +++ b/src/utils/media/image/mod.rs @@ -7,7 +7,7 @@ use gtk::{gdk, gio, prelude::*}; use image::{ColorType, DynamicImage, ImageDecoder, ImageResult}; use matrix_sdk::{ attachment::{BaseImageInfo, BaseThumbnailInfo, Thumbnail}, - media::{MediaFormat, MediaRequest, MediaThumbnailSettings, MediaThumbnailSize}, + media::{MediaFormat, MediaRequestParameters, MediaThumbnailSettings}, Client, }; use ruma::{ @@ -466,7 +466,7 @@ impl<'a> ThumbnailDownloader<'a> { if source.should_thumbnail(settings.prefer_thumbnail, settings.dimensions) { // Try to get a thumbnail. - let request = MediaRequest { + let request = MediaRequestParameters { source: source.source.to_common_media_source(), format: MediaFormat::Thumbnail(settings.into()), }; @@ -480,7 +480,7 @@ impl<'a> ThumbnailDownloader<'a> { } // Fallback to downloading the full source. - let request = MediaRequest { + let request = MediaRequestParameters { source: source.source.to_common_media_source(), format: MediaFormat::File, }; @@ -674,11 +674,9 @@ impl From for MediaThumbnailSettings { } = value; MediaThumbnailSettings { - size: MediaThumbnailSize { - method, - width: dimensions.width.into(), - height: dimensions.height.into(), - }, + method, + width: dimensions.width.into(), + height: dimensions.height.into(), animated, } } diff --git a/src/utils/media/image/queue.rs b/src/utils/media/image/queue.rs index 2fda207f..44548f3a 100644 --- a/src/utils/media/image/queue.rs +++ b/src/utils/media/image/queue.rs @@ -10,7 +10,7 @@ use std::{ use futures_util::future::BoxFuture; use gtk::glib; use matrix_sdk::{ - media::{MediaRequest, UniqueKey}, + media::{MediaRequestParameters, UniqueKey}, Client, }; use tokio::{ @@ -97,7 +97,7 @@ impl ImageRequestQueue { pub async fn add_download_request( &self, client: Client, - settings: MediaRequest, + settings: MediaRequestParameters, dimensions: Option, priority: ImageRequestPriority, ) -> ImageRequestHandle { @@ -181,7 +181,7 @@ impl ImageRequestQueueInner { fn add_download_request( &mut self, client: Client, - settings: MediaRequest, + settings: MediaRequestParameters, dimensions: Option, priority: ImageRequestPriority, ) -> ImageRequestHandle { @@ -467,7 +467,7 @@ struct DownloadRequestData { /// The Matrix client to use to make the request. client: Client, /// The settings of the request. - settings: MediaRequest, + settings: MediaRequestParameters, /// The dimensions to request. dimensions: Option, }