From 59a62b8552bf9ff9dee2100aaaff05097c0bca87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Commaille?= Date: Sat, 31 Aug 2024 15:53:21 +0200 Subject: [PATCH] chore: Upgrade matrix-sdk crate And run `cargo update`. --- Cargo.lock | 636 ++++++++---------- Cargo.toml | 6 +- src/session/model/room/event/mod.rs | 31 +- .../model/room/event/reaction_group.rs | 77 +-- src/session/model/room/event/reaction_list.rs | 12 +- src/session/model/room/mod.rs | 10 +- src/session/model/room/timeline/mod.rs | 3 +- .../model/room/timeline/timeline_item.rs | 6 +- .../view/content/room_history/item_row.rs | 5 +- .../room_history/message_row/reaction/mod.rs | 9 +- 10 files changed, 382 insertions(+), 413 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a73cec1f..dd89c56d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -11,7 +11,7 @@ dependencies = [ "macroific", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.77", ] [[package]] @@ -29,6 +29,12 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +[[package]] +name = "adler2" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" + [[package]] name = "aead" version = "0.5.2" @@ -174,7 +180,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.77", ] [[package]] @@ -185,9 +191,9 @@ checksum = "9d151e35f61089500b617991b791fc8bfd237ae50cd5950803758a179b41e67a" [[package]] name = "arrayvec" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" dependencies = [ "serde", ] @@ -324,7 +330,7 @@ checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.77", ] [[package]] @@ -374,7 +380,7 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.77", ] [[package]] @@ -385,13 +391,13 @@ checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" [[package]] name = "async-trait" -version = "0.1.81" +version = "0.1.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673ff8ca0349a028107" +checksum = "a27b8a3a6e1a44fa4c8baf1f653e4172e81486d4941f2237e20dc2d0cf4ddff1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.77", ] [[package]] @@ -497,7 +503,7 @@ dependencies = [ "cc", "cfg-if", "libc", - "miniz_oxide", + "miniz_oxide 0.7.4", "object", "rustc-demangle", ] @@ -532,7 +538,7 @@ dependencies = [ "regex", "rustc-hash", "shlex", - "syn 2.0.74", + "syn 2.0.77", ] [[package]] @@ -558,9 +564,9 @@ checksum = "a1d084b0137aaa901caf9f1e8b21daa6aa24d41cd806e111335541eff9683bd6" [[package]] name = "blake3" -version = "1.5.3" +version = "1.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9ec96fe9a81b5e365f9db71fe00edc4fe4ca2cc7dcb7861f0603012a7caa210" +checksum = "d82033247fd8e890df8f740e407ad4d038debb9eb1f40533fffb32e7d17dc6f7" dependencies = [ "arrayref", "arrayvec", @@ -623,9 +629,9 @@ checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" [[package]] name = "bytemuck" -version = "1.16.3" +version = "1.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "102087e286b4677862ea56cf8fc58bb2cdfa8725c40ffb80fe3a008eb7f2fc83" +checksum = "773d90827bc3feecfb67fab12e24de0749aad83c74b9504ecde46237b5cd24e2" [[package]] name = "byteorder" @@ -653,15 +659,14 @@ checksum = "a3e368af43e418a04d52505cf3dbc23dda4e3407ae2fa99fd0e4f308ce546acc" [[package]] name = "cairo-rs" -version = "0.20.0" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "797fd5a634dcb0ad0d7d583df794deb0a236d88e759cd34b7da20198c6c9d145" +checksum = "e8a0ea147c94108c9613235388f540e4d14c327f7081c9e471fc8ee8a2533e69" dependencies = [ "bitflags 2.6.0", "cairo-sys-rs", "glib", "libc", - "thiserror", ] [[package]] @@ -672,7 +677,7 @@ checksum = "428290f914b9b86089f60f5d8a9f6e440508e1bcff23b25afd51502b0a2da88f" dependencies = [ "glib-sys", "libc", - "system-deps 7.0.1", + "system-deps 7.0.2", ] [[package]] @@ -686,12 +691,13 @@ dependencies = [ [[package]] name = "cc" -version = "1.1.10" +version = "1.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9e8aabfac534be767c909e0690571677d49f41bd8465ae876fe043d52ba5292" +checksum = "57b6a275aa2903740dc87da01c62040406b8812552e97129a63ea8850a17c6e6" dependencies = [ "jobserver", "libc", + "shlex", ] [[package]] @@ -713,6 +719,16 @@ dependencies = [ "target-lexicon", ] +[[package]] +name = "cfg-expr" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "345c78335be0624ed29012dc10c49102196c6882c12dde65d9f35b02da2aada8" +dependencies = [ + "smallvec", + "target-lexicon", +] + [[package]] name = "cfg-if" version = "1.0.0" @@ -760,7 +776,7 @@ dependencies = [ "js-sys", "num-traits", "wasm-bindgen", - "windows-targets 0.52.6", + "windows-targets", ] [[package]] @@ -808,15 +824,15 @@ checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" [[package]] name = "const_panic" -version = "0.2.8" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6051f239ecec86fde3410901ab7860d458d160371533842974fc61f96d15879b" +checksum = "7782af8f90fe69a4bb41e460abe1727d493403d8b2cc43201a3a3e906b24379f" [[package]] name = "constant_time_eq" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" +checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6" [[package]] name = "convert_case" @@ -854,9 +870,9 @@ checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "cpufeatures" -version = "0.2.12" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" +checksum = "51e852e6dc9a5bed1fae92dd2375037bf2b768725bf3be87811edee3249d09ad" dependencies = [ "libc", ] @@ -940,7 +956,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.77", ] [[package]] @@ -964,7 +980,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.74", + "syn 2.0.77", ] [[package]] @@ -975,7 +991,7 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core", "quote", - "syn 2.0.74", + "syn 2.0.77", ] [[package]] @@ -1034,7 +1050,7 @@ dependencies = [ "macroific", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.77", ] [[package]] @@ -1057,7 +1073,7 @@ checksum = "8034092389675178f570469e6c3b0465d3d30b4505c294a6550db47f3c17ad18" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.77", ] [[package]] @@ -1071,33 +1087,33 @@ dependencies = [ [[package]] name = "derive_builder" -version = "0.20.0" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0350b5cb0331628a5916d6c5c0b72e97393b8b6b03b47a9284f4e7f5a405ffd7" +checksum = "cd33f37ee6a119146a1781d3356a7c26028f83d779b2e04ecd45fdc75c76877b" dependencies = [ "derive_builder_macro", ] [[package]] name = "derive_builder_core" -version = "0.20.0" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d48cda787f839151732d396ac69e3473923d54312c070ee21e9effcaa8ca0b1d" +checksum = "7431fa049613920234f22c47fdc33e6cf3ee83067091ea4277a3f8c4587aae38" dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.77", ] [[package]] name = "derive_builder_macro" -version = "0.20.0" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "206868b8242f27cecce124c19fd88157fbd0dd334df2587f36417bafbc85097b" +checksum = "4abae7035bf79b9877b779505d8cf3749285b80c43941eda66604841889451dc" dependencies = [ "derive_builder_core", - "syn 2.0.74", + "syn 2.0.77", ] [[package]] @@ -1188,7 +1204,7 @@ checksum = "de0d48a183585823424a4ce1aa132d174a6a81bd540895822eb4c8373a8e49e8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.77", ] [[package]] @@ -1303,21 +1319,21 @@ checksum = "7360491ce676a36bf9bb3c56c1aa791658183a54d2744120f27285738d90465a" [[package]] name = "fancy_constructor" -version = "1.2.2" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f71f317e4af73b2f8f608fac190c52eac4b1879d2145df1db2fe48881ca69435" +checksum = "07b19d0e43eae2bfbafe4931b5e79c73fb1a849ca15cd41a761a7b8587f9a1a2" dependencies = [ "macroific", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.77", ] [[package]] name = "fastrand" -version = "2.1.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" +checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" [[package]] name = "fiat-crypto" @@ -1343,12 +1359,12 @@ checksum = "b3ea1ec5f8307826a5b71094dd91fc04d4ae75d5709b20ad351c7fb4815c86ec" [[package]] name = "flate2" -version = "1.0.31" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f211bbe8e69bbd0cfdea405084f128ae8b4aaa6b0b522fc8f2b009084797920" +checksum = "324a1be68054ef05ad64b861cc9eaf1d623d2d8cb25b4bf2cb9cdd902b4bf253" dependencies = [ "crc32fast", - "miniz_oxide", + "miniz_oxide 0.8.0", ] [[package]] @@ -1384,7 +1400,7 @@ checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.77", ] [[package]] @@ -1539,7 +1555,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.77", ] [[package]] @@ -1590,7 +1606,7 @@ dependencies = [ "g2poly", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.77", ] [[package]] @@ -1611,9 +1627,9 @@ checksum = "0fd8b261ccf00df8c5cc60c082bb7d7aa64c33a433cfcc091ca244326c924b2c" [[package]] name = "gdk-pixbuf" -version = "0.20.0" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28bb53ecb56857c683c9ec859908e076dd3969c7d67598bd8b1ce095d211304a" +checksum = "8730751991b97419fc3f0c2dca2c9e45b48edf46e48e0f965964ecf33889812f" dependencies = [ "gdk-pixbuf-sys", "gio", @@ -1623,15 +1639,15 @@ dependencies = [ [[package]] name = "gdk-pixbuf-sys" -version = "0.20.0" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f6681a0c1330d1d3968bec1529f7172d62819ef0bdbb0d18022320654158b03" +checksum = "1ffbf649fd5b1c8c0f0feeb015b7533c3ef92da2887fb95ddd338bc2b1644a7c" dependencies = [ "gio-sys", "glib-sys", "gobject-sys", "libc", - "system-deps 7.0.1", + "system-deps 7.0.2", ] [[package]] @@ -1663,7 +1679,7 @@ dependencies = [ "libc", "pango-sys", "pkg-config", - "system-deps 7.0.1", + "system-deps 7.0.2", ] [[package]] @@ -1688,7 +1704,7 @@ dependencies = [ "gdk4-sys", "glib-sys", "libc", - "system-deps 7.0.1", + "system-deps 7.0.2", ] [[package]] @@ -1735,9 +1751,9 @@ dependencies = [ [[package]] name = "gettext-rs" -version = "0.7.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e49ea8a8fad198aaa1f9655a2524b64b70eb06b2f3ff37da407566c93054f364" +checksum = "4a6716b8a0db461a2720b850ba1623e5b69e4b1aa0224cf5e1fb23a0fe49e65c" dependencies = [ "gettext-sys", "locale_config", @@ -1745,9 +1761,9 @@ dependencies = [ [[package]] name = "gettext-sys" -version = "0.21.3" +version = "0.21.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c63ce2e00f56a206778276704bbe38564c8695249fdc8f354b4ef71c57c3839d" +checksum = "f7b8797f28f2dabfbe2caadb6db4f7fd739e251b5ede0a2ba49e506071edcf67" dependencies = [ "cc", "temp-dir", @@ -1761,9 +1777,9 @@ checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" [[package]] name = "gio" -version = "0.20.0" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "398e3da68749fdc32783cbf7521ec3f65c9cf946db8c7774f8460af49e52c6e2" +checksum = "dcacaa37401cad0a95aadd266bc39c72a131d454fc012f6dfd217f891d76cc52" dependencies = [ "futures-channel", "futures-core", @@ -1774,27 +1790,26 @@ dependencies = [ "libc", "pin-project-lite", "smallvec", - "thiserror", ] [[package]] name = "gio-sys" -version = "0.20.0" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4feb96b31c32730ea3e1e89aecd2e4e37ecb1c473ad8f685e3430a159419f63" +checksum = "5237611e97e9b86ab5768adc3eef853ae713ea797aa3835404acdfacffc9fb38" dependencies = [ "glib-sys", "gobject-sys", "libc", - "system-deps 7.0.1", + "system-deps 7.0.2", "windows-sys 0.52.0", ] [[package]] name = "glib" -version = "0.20.0" +version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fee90a615ce05be7a32932cfb8adf2c4bbb4700e80d37713c981fb24c0c56238" +checksum = "9c1ea829497810f8e87f5ee6d05c4879af641704add879e6b6080607cceeefe4" dependencies = [ "bitflags 2.6.0", "futures-channel", @@ -1809,30 +1824,29 @@ dependencies = [ "libc", "memchr", "smallvec", - "thiserror", ] [[package]] name = "glib-macros" -version = "0.20.0" +version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4da558d8177c0c8c54368818b508a4244e1286fce2858cef4e547023f0cfa5ef" +checksum = "951aa19c5e89555c0ca5e94ee874b24b2594ece8412b387bd84ee3266b8a3ea0" dependencies = [ "heck", "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.77", ] [[package]] name = "glib-sys" -version = "0.20.0" +version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4958c26e5a01c9af00dea669a97369eccbec29a8e6d125c24ea2d85ee7467b60" +checksum = "92eee4531c1c9abba945d19378b205031b5890e1f99c319ba0503b6e0c06a163" dependencies = [ "libc", - "system-deps 7.0.1", + "system-deps 7.0.2", ] [[package]] @@ -1918,20 +1932,20 @@ dependencies = [ [[package]] name = "gobject-sys" -version = "0.20.0" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6908864f5ffff15b56df7e90346863904f49b949337ed0456b9287af61903b8" +checksum = "fa3d1dcd8a1eb2e7c22be3d5e792b14b186f3524f79b25631730f9a8c169d49a" dependencies = [ "glib-sys", "libc", - "system-deps 7.0.1", + "system-deps 7.0.2", ] [[package]] name = "graphene-rs" -version = "0.20.0" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "630e940ad5824f90221d6579043a9cd1f8bec86b4a17faaf7827d58eb16e8c1f" +checksum = "80aac87f74e81c0e13433e892a047237abdc37945c86887f5eed905038356e69" dependencies = [ "glib", "graphene-sys", @@ -1940,14 +1954,14 @@ dependencies = [ [[package]] name = "graphene-sys" -version = "0.20.0" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fb8fade7b754982f47ebbed241fd2680816fdd4598321784da10b9e1168836a" +checksum = "cc2f91ecd32989efad60326cc20a8fb252bd2852239a08e4e70cde8c100de9ca" dependencies = [ "glib-sys", "libc", "pkg-config", - "system-deps 7.0.1", + "system-deps 7.0.2", ] [[package]] @@ -1990,14 +2004,14 @@ dependencies = [ "graphene-sys", "libc", "pango-sys", - "system-deps 7.0.1", + "system-deps 7.0.2", ] [[package]] name = "gst-plugin-gtk4" -version = "0.13.0" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69b98aeb531b6cf9c3a6eb36742cedc0168054e2f040b76ddc61260c10dec589" +checksum = "44b3fe6a92ebf2e62366d9f2d8633cc634187bb7c40fe4db05edfb809e928197" dependencies = [ "async-channel", "gdk4-win32", @@ -2018,14 +2032,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4e5e874f1660252fd2ec81c602066df3633b3a6fcbe2b196f7f93c27cf069b2a" dependencies = [ "chrono", - "toml_edit 0.22.20", + "toml_edit", ] [[package]] name = "gstreamer" -version = "0.23.0" +version = "0.23.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21e95b1d1153239a621ec143501fdcca6c1ad3efb87d268597285f85c4136f73" +checksum = "683e15f8cc3a1a2646d9fe2181a58b7abb4c166256d8d15cce368e420c741140" dependencies = [ "cfg-if", "futures-channel", @@ -2071,7 +2085,7 @@ dependencies = [ "gstreamer-base-sys", "gstreamer-sys", "libc", - "system-deps 7.0.1", + "system-deps 7.0.2", ] [[package]] @@ -2101,14 +2115,14 @@ dependencies = [ "gstreamer-base-sys", "gstreamer-sys", "libc", - "system-deps 7.0.1", + "system-deps 7.0.2", ] [[package]] name = "gstreamer-base" -version = "0.23.0" +version = "0.23.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3faa0b3cf361bf538dcb25b5cb7f6e73bd872ed031d85f3997b42d3fbd66409" +checksum = "ed5d73cb5cbf229c8904fba5ff93b1863f186bccc062064c1b2a9000750cc06e" dependencies = [ "atomic_refcell", "cfg-if", @@ -2128,7 +2142,7 @@ dependencies = [ "gobject-sys", "gstreamer-sys", "libc", - "system-deps 7.0.1", + "system-deps 7.0.2", ] [[package]] @@ -2158,7 +2172,7 @@ dependencies = [ "gstreamer-sys", "gstreamer-video-sys", "libc", - "system-deps 7.0.1", + "system-deps 7.0.2", ] [[package]] @@ -2188,7 +2202,7 @@ dependencies = [ "gstreamer-sys", "gstreamer-video-sys", "libc", - "system-deps 7.0.1", + "system-deps 7.0.2", ] [[package]] @@ -2215,7 +2229,7 @@ dependencies = [ "gstreamer-sys", "gstreamer-video-sys", "libc", - "system-deps 7.0.1", + "system-deps 7.0.2", ] [[package]] @@ -2227,7 +2241,7 @@ dependencies = [ "glib-sys", "gobject-sys", "libc", - "system-deps 7.0.1", + "system-deps 7.0.2", ] [[package]] @@ -2258,14 +2272,14 @@ dependencies = [ "gstreamer-base-sys", "gstreamer-sys", "libc", - "system-deps 7.0.1", + "system-deps 7.0.2", ] [[package]] name = "gtk4" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eaffc6c743c9160514cc9b67eace364e5dc5798369fa809cdb04e035c21c5c5d" +checksum = "f4fe572bf318e5dbc6f5a2f8a25d853f1ae3f42768c0b08af6ca20a18f4057e1" dependencies = [ "cairo-rs", "field-offset", @@ -2284,14 +2298,14 @@ dependencies = [ [[package]] name = "gtk4-macros" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "188211f546ce5801f6d0245c37b6249143a2cb4fa040e54829ca1e76796e9f09" +checksum = "e9e7b362c8fccd2712297903717d65d30defdab2b509bc9d209cbe5ffb9fabaf" dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.77", ] [[package]] @@ -2310,14 +2324,14 @@ dependencies = [ "gsk4-sys", "libc", "pango-sys", - "system-deps 7.0.1", + "system-deps 7.0.2", ] [[package]] name = "gufo-common" -version = "0.1.0" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1af2c3c6b244761a93e30989fa0868b92e386b6eb817fc6ced405462af4a7db" +checksum = "269bc5c70016d1e90449d71263a72dd2035a2ecbf9cda6305774fa44844bd662" dependencies = [ "once_cell", "paste", @@ -2326,9 +2340,9 @@ dependencies = [ [[package]] name = "gufo-exif" -version = "0.1.1" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2aff5e56872f03d477b55cccef818e6cdae482485c39c130ff9b3b31b69ea10" +checksum = "f4066b9e0375d2b44da9e7f0282c2bd65136fe5e7d033259b2181f499e312e1b" dependencies = [ "gufo-common", "thiserror", @@ -2407,7 +2421,7 @@ dependencies = [ "markup5ever", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.77", ] [[package]] @@ -2630,9 +2644,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.3.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3fc2e30ba82dd1b3911c8de1ffc143c74a914a14e99514d7637e3099df5ea0" +checksum = "68b900aa2f7301e21c36462b170ee99994de34dff39a4a6a528e80e7376d07e5" dependencies = [ "equivalent", "hashbrown", @@ -2656,9 +2670,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" dependencies = [ "cfg-if", - "js-sys", - "wasm-bindgen", - "web-sys", ] [[package]] @@ -2717,9 +2728,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.69" +version = "0.3.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" +checksum = "1868808506b929d7b0cfa8f75951347aa71bb21144b7791bae35d9bccfcfe37a" dependencies = [ "wasm-bindgen", ] @@ -2828,14 +2839,14 @@ dependencies = [ "gtk4-sys", "libc", "pango-sys", - "system-deps 7.0.1", + "system-deps 7.0.2", ] [[package]] name = "libc" -version = "0.2.155" +version = "0.2.158" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" +checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" [[package]] name = "libloading" @@ -2844,7 +2855,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4979f22fdb869068da03c9f7528f8297c6fd2606bc3a4affe42e6a823fdb8da4" dependencies = [ "cfg-if", - "windows-targets 0.52.6", + "windows-targets", ] [[package]] @@ -2899,7 +2910,7 @@ dependencies = [ "gobject-sys", "gtk4-sys", "libc", - "system-deps 7.0.1", + "system-deps 7.0.2", ] [[package]] @@ -2942,9 +2953,9 @@ dependencies = [ [[package]] name = "libwebp-sys" -version = "0.9.5" +version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "829b6b604f31ed6d2bccbac841fe0788de93dbd87e4eb1ba2c4adfe8c012a838" +checksum = "54cd30df7c7165ce74a456e4ca9732c603e8dc5e60784558c1c6dc047f876733" dependencies = [ "cc", "glob", @@ -3029,7 +3040,7 @@ dependencies = [ "cfg-if", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.77", ] [[package]] @@ -3040,7 +3051,7 @@ checksum = "13198c120864097a565ccb3ff947672d969932b7975ebd4085732c9f09435e55" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.77", ] [[package]] @@ -3053,7 +3064,7 @@ dependencies = [ "macroific_core", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.77", ] [[package]] @@ -3120,13 +3131,13 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.77", ] [[package]] name = "matrix-sdk" version = "0.7.1" -source = "git+https://github.com/matrix-org/matrix-rust-sdk.git?rev=92b4c2a469f507696fa9db3d6bdb000a761e2694#92b4c2a469f507696fa9db3d6bdb000a761e2694" +source = "git+https://github.com/matrix-org/matrix-rust-sdk.git?rev=7f4e79e2a3bb07fa189c62987a06b3f78f2e4286#7f4e79e2a3bb07fa189c62987a06b3f78f2e4286" dependencies = [ "anymap2", "aquamarine", @@ -3176,7 +3187,7 @@ dependencies = [ [[package]] name = "matrix-sdk-base" version = "0.7.0" -source = "git+https://github.com/matrix-org/matrix-rust-sdk.git?rev=92b4c2a469f507696fa9db3d6bdb000a761e2694#92b4c2a469f507696fa9db3d6bdb000a761e2694" +source = "git+https://github.com/matrix-org/matrix-rust-sdk.git?rev=7f4e79e2a3bb07fa189c62987a06b3f78f2e4286#7f4e79e2a3bb07fa189c62987a06b3f78f2e4286" dependencies = [ "as_variant", "async-trait", @@ -3200,13 +3211,12 @@ dependencies = [ [[package]] name = "matrix-sdk-common" version = "0.7.0" -source = "git+https://github.com/matrix-org/matrix-rust-sdk.git?rev=92b4c2a469f507696fa9db3d6bdb000a761e2694#92b4c2a469f507696fa9db3d6bdb000a761e2694" +source = "git+https://github.com/matrix-org/matrix-rust-sdk.git?rev=7f4e79e2a3bb07fa189c62987a06b3f78f2e4286#7f4e79e2a3bb07fa189c62987a06b3f78f2e4286" dependencies = [ "async-trait", "futures-core", "futures-util", "gloo-timers", - "instant", "ruma", "serde", "serde_json", @@ -3221,8 +3231,8 @@ dependencies = [ [[package]] name = "matrix-sdk-crypto" -version = "0.7.1" -source = "git+https://github.com/matrix-org/matrix-rust-sdk.git?rev=92b4c2a469f507696fa9db3d6bdb000a761e2694#92b4c2a469f507696fa9db3d6bdb000a761e2694" +version = "0.7.2" +source = "git+https://github.com/matrix-org/matrix-rust-sdk.git?rev=7f4e79e2a3bb07fa189c62987a06b3f78f2e4286#7f4e79e2a3bb07fa189c62987a06b3f78f2e4286" dependencies = [ "aes", "as_variant", @@ -3263,7 +3273,7 @@ dependencies = [ [[package]] name = "matrix-sdk-indexeddb" version = "0.7.0" -source = "git+https://github.com/matrix-org/matrix-rust-sdk.git?rev=92b4c2a469f507696fa9db3d6bdb000a761e2694#92b4c2a469f507696fa9db3d6bdb000a761e2694" +source = "git+https://github.com/matrix-org/matrix-rust-sdk.git?rev=7f4e79e2a3bb07fa189c62987a06b3f78f2e4286#7f4e79e2a3bb07fa189c62987a06b3f78f2e4286" dependencies = [ "anyhow", "async-trait", @@ -3290,8 +3300,8 @@ dependencies = [ [[package]] name = "matrix-sdk-qrcode" -version = "0.7.0" -source = "git+https://github.com/matrix-org/matrix-rust-sdk.git?rev=92b4c2a469f507696fa9db3d6bdb000a761e2694#92b4c2a469f507696fa9db3d6bdb000a761e2694" +version = "0.7.1" +source = "git+https://github.com/matrix-org/matrix-rust-sdk.git?rev=7f4e79e2a3bb07fa189c62987a06b3f78f2e4286#7f4e79e2a3bb07fa189c62987a06b3f78f2e4286" dependencies = [ "byteorder", "qrcode", @@ -3302,8 +3312,8 @@ dependencies = [ [[package]] name = "matrix-sdk-sqlite" -version = "0.7.0" -source = "git+https://github.com/matrix-org/matrix-rust-sdk.git?rev=92b4c2a469f507696fa9db3d6bdb000a761e2694#92b4c2a469f507696fa9db3d6bdb000a761e2694" +version = "0.7.1" +source = "git+https://github.com/matrix-org/matrix-rust-sdk.git?rev=7f4e79e2a3bb07fa189c62987a06b3f78f2e4286#7f4e79e2a3bb07fa189c62987a06b3f78f2e4286" dependencies = [ "async-trait", "deadpool-sqlite", @@ -3325,7 +3335,7 @@ dependencies = [ [[package]] name = "matrix-sdk-store-encryption" version = "0.7.0" -source = "git+https://github.com/matrix-org/matrix-rust-sdk.git?rev=92b4c2a469f507696fa9db3d6bdb000a761e2694#92b4c2a469f507696fa9db3d6bdb000a761e2694" +source = "git+https://github.com/matrix-org/matrix-rust-sdk.git?rev=7f4e79e2a3bb07fa189c62987a06b3f78f2e4286#7f4e79e2a3bb07fa189c62987a06b3f78f2e4286" dependencies = [ "base64", "blake3", @@ -3344,13 +3354,12 @@ dependencies = [ [[package]] name = "matrix-sdk-ui" version = "0.7.0" -source = "git+https://github.com/matrix-org/matrix-rust-sdk.git?rev=92b4c2a469f507696fa9db3d6bdb000a761e2694#92b4c2a469f507696fa9db3d6bdb000a761e2694" +source = "git+https://github.com/matrix-org/matrix-rust-sdk.git?rev=7f4e79e2a3bb07fa189c62987a06b3f78f2e4286#7f4e79e2a3bb07fa189c62987a06b3f78f2e4286" dependencies = [ "as_variant", "async-once-cell", "async-rx", "async-stream", - "async-trait", "async_cell", "chrono", "eyeball", @@ -3418,9 +3427,9 @@ checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" [[package]] name = "mime2ext" -version = "0.1.52" +version = "0.1.53" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1a85a5069ebd40e64b1985773cc81addbe9d90d7ecf60e7b5475a57ad584c70" +checksum = "515a63dc9666c865e848b043ab52fe9a5c713ae89cde4b5fbaae67cfd614b93a" [[package]] name = "mime_guess" @@ -3447,11 +3456,20 @@ dependencies = [ "adler", ] +[[package]] +name = "miniz_oxide" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" +dependencies = [ + "adler2", +] + [[package]] name = "mio" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4569e456d394deccd22ce1c1913e6ea0e54519f577285001215d33557431afe4" +checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" dependencies = [ "hermit-abi 0.3.9", "libc", @@ -3670,9 +3688,9 @@ dependencies = [ [[package]] name = "object" -version = "0.36.3" +version = "0.36.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27b64972346851a39438c60b341ebc01bba47464ae329e55cf343eb93964efd9" +checksum = "084f1a5821ac4c651660a94a7153d27ac9d8a53736203f58b31945ded098070a" dependencies = [ "memchr", ] @@ -3732,7 +3750,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.77", ] [[package]] @@ -3780,9 +3798,9 @@ checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" [[package]] name = "pango" -version = "0.20.0" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54768854025df6903061d0084fd9702a253ddfd60db7d9b751d43b76689a7f0a" +checksum = "5764e5a174a5a0ec054fe5962ce6d4fc7052e2d0dcc23bbc77202b40a4a403d3" dependencies = [ "gio", "glib", @@ -3792,14 +3810,14 @@ dependencies = [ [[package]] name = "pango-sys" -version = "0.20.0" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b07cc57d10cee4ec661f718a6902cee18c2f4cfae08e87e5a390525946913390" +checksum = "fd317e1de76b14b3d3efe05518c08b360327f1ab7fec150473a89ffcad4b072d" dependencies = [ "glib-sys", "gobject-sys", "libc", - "system-deps 7.0.1", + "system-deps 7.0.2", ] [[package]] @@ -3828,7 +3846,7 @@ dependencies = [ "libc", "redox_syscall", "smallvec", - "windows-targets 0.52.6", + "windows-targets", ] [[package]] @@ -3903,7 +3921,7 @@ dependencies = [ "phf_shared 0.11.2", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.77", ] [[package]] @@ -3941,7 +3959,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.77", ] [[package]] @@ -4071,11 +4089,11 @@ checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" [[package]] name = "proc-macro-crate" -version = "3.1.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" +checksum = "8ecf48c7ca261d60b74ab1a7b20da18bede46776b2e55535cb958eb595c5fa7b" dependencies = [ - "toml_edit 0.21.1", + "toml_edit", ] [[package]] @@ -4113,9 +4131,9 @@ dependencies = [ [[package]] name = "prost" -version = "0.13.1" +version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13db3d3fde688c61e2446b4d843bc27a7e8af269a69440c0308021dc92333cc" +checksum = "3b2ecbe40f08db5c006b5764a2645f7f3f141ce756412ac9e1dd6087e6d32995" dependencies = [ "bytes", "prost-derive", @@ -4123,22 +4141,22 @@ dependencies = [ [[package]] name = "prost-derive" -version = "0.13.1" +version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18bec9b0adc4eba778b33684b7ba3e7137789434769ee3ce3930463ef904cfca" +checksum = "acf0c195eebb4af52c752bec4f52f645da98b6e92077a04110c7f349477ae5ac" dependencies = [ "anyhow", "itertools 0.13.0", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.77", ] [[package]] name = "pulldown-cmark" -version = "0.11.0" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8746739f11d39ce5ad5c2520a9b75285310dbfe78c541ccf832d38615765aec0" +checksum = "cb4e75767fbc9d92b90e4d0c011f61358cde9513b31ef07ea3631b15ffc3b4fd" dependencies = [ "bitflags 2.6.0", "getopts", @@ -4164,9 +4182,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.36" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] @@ -4291,9 +4309,9 @@ checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" [[package]] name = "reqwest" -version = "0.12.5" +version = "0.12.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7d6d2a27d57148378eb5e111173f4276ad26340ecc5c49a4a2152167a2d6a37" +checksum = "f8f4955649ef5c38cc7f9e8aa41761d48fb9677197daea9984dc54f56aad5e63" dependencies = [ "async-compression", "base64", @@ -4329,7 +4347,7 @@ dependencies = [ "wasm-bindgen-futures", "wasm-streams", "web-sys", - "winreg", + "windows-registry", ] [[package]] @@ -4368,7 +4386,7 @@ dependencies = [ [[package]] name = "ruma" version = "0.10.1" -source = "git+https://github.com/matrix-org/ruma.git?rev=4d3d8b46fd519012e4585ccf00dbea1eb602c028#4d3d8b46fd519012e4585ccf00dbea1eb602c028" +source = "git+https://github.com/matrix-org/ruma.git?rev=17f6e555528512319e706bb2cfe68a12ec5603b6#17f6e555528512319e706bb2cfe68a12ec5603b6" dependencies = [ "assign", "js_int", @@ -4385,7 +4403,7 @@ dependencies = [ [[package]] name = "ruma-client-api" version = "0.18.0" -source = "git+https://github.com/matrix-org/ruma.git?rev=4d3d8b46fd519012e4585ccf00dbea1eb602c028#4d3d8b46fd519012e4585ccf00dbea1eb602c028" +source = "git+https://github.com/matrix-org/ruma.git?rev=17f6e555528512319e706bb2cfe68a12ec5603b6#17f6e555528512319e706bb2cfe68a12ec5603b6" dependencies = [ "as_variant", "assign", @@ -4408,7 +4426,7 @@ dependencies = [ [[package]] name = "ruma-common" version = "0.13.0" -source = "git+https://github.com/matrix-org/ruma.git?rev=4d3d8b46fd519012e4585ccf00dbea1eb602c028#4d3d8b46fd519012e4585ccf00dbea1eb602c028" +source = "git+https://github.com/matrix-org/ruma.git?rev=17f6e555528512319e706bb2cfe68a12ec5603b6#17f6e555528512319e706bb2cfe68a12ec5603b6" dependencies = [ "as_variant", "base64", @@ -4440,7 +4458,7 @@ dependencies = [ [[package]] name = "ruma-events" version = "0.28.1" -source = "git+https://github.com/matrix-org/ruma.git?rev=4d3d8b46fd519012e4585ccf00dbea1eb602c028#4d3d8b46fd519012e4585ccf00dbea1eb602c028" +source = "git+https://github.com/matrix-org/ruma.git?rev=17f6e555528512319e706bb2cfe68a12ec5603b6#17f6e555528512319e706bb2cfe68a12ec5603b6" dependencies = [ "as_variant", "indexmap", @@ -4465,9 +4483,11 @@ dependencies = [ [[package]] name = "ruma-federation-api" version = "0.9.0" -source = "git+https://github.com/matrix-org/ruma.git?rev=4d3d8b46fd519012e4585ccf00dbea1eb602c028#4d3d8b46fd519012e4585ccf00dbea1eb602c028" +source = "git+https://github.com/matrix-org/ruma.git?rev=17f6e555528512319e706bb2cfe68a12ec5603b6#17f6e555528512319e706bb2cfe68a12ec5603b6" dependencies = [ + "http", "js_int", + "mime", "ruma-common", "ruma-events", "serde", @@ -4477,7 +4497,7 @@ dependencies = [ [[package]] name = "ruma-html" version = "0.2.0" -source = "git+https://github.com/matrix-org/ruma.git?rev=4d3d8b46fd519012e4585ccf00dbea1eb602c028#4d3d8b46fd519012e4585ccf00dbea1eb602c028" +source = "git+https://github.com/matrix-org/ruma.git?rev=17f6e555528512319e706bb2cfe68a12ec5603b6#17f6e555528512319e706bb2cfe68a12ec5603b6" dependencies = [ "as_variant", "html5ever", @@ -4490,7 +4510,7 @@ dependencies = [ [[package]] name = "ruma-identifiers-validation" version = "0.9.5" -source = "git+https://github.com/matrix-org/ruma.git?rev=4d3d8b46fd519012e4585ccf00dbea1eb602c028#4d3d8b46fd519012e4585ccf00dbea1eb602c028" +source = "git+https://github.com/matrix-org/ruma.git?rev=17f6e555528512319e706bb2cfe68a12ec5603b6#17f6e555528512319e706bb2cfe68a12ec5603b6" dependencies = [ "js_int", "thiserror", @@ -4499,7 +4519,7 @@ dependencies = [ [[package]] name = "ruma-macros" version = "0.13.0" -source = "git+https://github.com/matrix-org/ruma.git?rev=4d3d8b46fd519012e4585ccf00dbea1eb602c028#4d3d8b46fd519012e4585ccf00dbea1eb602c028" +source = "git+https://github.com/matrix-org/ruma.git?rev=17f6e555528512319e706bb2cfe68a12ec5603b6#17f6e555528512319e706bb2cfe68a12ec5603b6" dependencies = [ "once_cell", "proc-macro-crate", @@ -4507,14 +4527,14 @@ dependencies = [ "quote", "ruma-identifiers-validation", "serde", - "syn 2.0.74", + "syn 2.0.77", "toml", ] [[package]] name = "ruma-push-gateway-api" version = "0.9.0" -source = "git+https://github.com/matrix-org/ruma.git?rev=4d3d8b46fd519012e4585ccf00dbea1eb602c028#4d3d8b46fd519012e4585ccf00dbea1eb602c028" +source = "git+https://github.com/matrix-org/ruma.git?rev=17f6e555528512319e706bb2cfe68a12ec5603b6#17f6e555528512319e706bb2cfe68a12ec5603b6" dependencies = [ "js_int", "ruma-common", @@ -4551,18 +4571,18 @@ checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" [[package]] name = "rustc_version" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" dependencies = [ "semver", ] [[package]] name = "rustix" -version = "0.38.34" +version = "0.38.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" +checksum = "a85d50532239da68e9addb745ba38ff4612a242c1c7ceea689c4bc7c2f43c36f" dependencies = [ "bitflags 2.6.0", "errno", @@ -4654,9 +4674,9 @@ checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" [[package]] name = "serde" -version = "1.0.206" +version = "1.0.209" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b3e4cd94123dd520a128bcd11e34d9e9e423e7e3e50425cb1b4b1e3549d0284" +checksum = "99fce0ffe7310761ca6bf9faf5115afbc19688edd00171d81b1bb1b116c63e09" dependencies = [ "serde_derive", ] @@ -4683,13 +4703,13 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.206" +version = "1.0.209" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fabfb6138d2383ea8208cf98ccf69cdfb1aff4088460681d84189aa259762f97" +checksum = "a5831b979fd7b5439637af1752d535ff49f4860c0f341d1baeb6faf0f4242170" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.77", ] [[package]] @@ -4707,9 +4727,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.124" +version = "1.0.127" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66ad62847a56b3dba58cc891acd13884b9c61138d330c0d7b6181713d4fce38d" +checksum = "8043c06d9f82bd7271361ed64f415fe5e12a77fdb52e573e7f06a516dea329ad" dependencies = [ "itoa", "memchr", @@ -4735,7 +4755,7 @@ checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.77", ] [[package]] @@ -4877,7 +4897,7 @@ dependencies = [ "gtk4-sys", "libc", "pango-sys", - "system-deps 7.0.1", + "system-deps 7.0.2", ] [[package]] @@ -4953,7 +4973,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.74", + "syn 2.0.77", ] [[package]] @@ -4974,9 +4994,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.74" +version = "2.0.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fceb41e3d546d0bd83421d3409b1460cc7444cd389341a4c880fe7a042cb3d7" +checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed" dependencies = [ "proc-macro2", "quote", @@ -4994,6 +5014,9 @@ name = "sync_wrapper" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" +dependencies = [ + "futures-core", +] [[package]] name = "system-deps" @@ -5001,7 +5024,7 @@ version = "6.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a3e535eb8dded36d55ec13eddacd30dec501792ff23a0b1682c38601b8cf2349" dependencies = [ - "cfg-expr", + "cfg-expr 0.15.8", "heck", "pkg-config", "toml", @@ -5010,11 +5033,11 @@ dependencies = [ [[package]] name = "system-deps" -version = "7.0.1" +version = "7.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c81f13d9a334a6c242465140bd262fae382b752ff2011c4f7419919a9c97922" +checksum = "070a0a5e7da2d24be457809c4b3baa57a835fd2829ad8b86f9a049052fe71031" dependencies = [ - "cfg-expr", + "cfg-expr 0.16.0", "heck", "pkg-config", "toml", @@ -5074,7 +5097,7 @@ checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.77", ] [[package]] @@ -5145,9 +5168,9 @@ dependencies = [ [[package]] name = "tokio" -version = "1.39.2" +version = "1.40.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "daa4fb1bc778bd6f04cbfc4bb2d06a7396a8f299dc33ea1900cedaa316f467b1" +checksum = "e2b070231665d27ad9ec9b8df639893f46727666c6767db40317fbe920a5d998" dependencies = [ "backtrace", "bytes", @@ -5169,7 +5192,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.77", ] [[package]] @@ -5228,7 +5251,7 @@ dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.22.20", + "toml_edit", ] [[package]] @@ -5240,17 +5263,6 @@ dependencies = [ "serde", ] -[[package]] -name = "toml_edit" -version = "0.21.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" -dependencies = [ - "indexmap", - "toml_datetime", - "winnow 0.5.40", -] - [[package]] name = "toml_edit" version = "0.22.20" @@ -5261,7 +5273,7 @@ dependencies = [ "serde", "serde_spanned", "toml_datetime", - "winnow 0.6.18", + "winnow", ] [[package]] @@ -5282,15 +5294,15 @@ dependencies = [ [[package]] name = "tower-layer" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" [[package]] name = "tower-service" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" @@ -5312,7 +5324,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.77", ] [[package]] @@ -5567,34 +5579,35 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" +checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5" dependencies = [ "cfg-if", + "once_cell", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" +checksum = "9de396da306523044d3302746f1208fa71d7532227f15e347e2d93e4145dd77b" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.77", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.42" +version = "0.4.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" +checksum = "61e9300f63a621e96ed275155c108eb6f843b6a26d053f122ab69724559dc8ed" dependencies = [ "cfg-if", "js-sys", @@ -5604,9 +5617,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" +checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -5614,22 +5627,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" +checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.77", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" +checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484" [[package]] name = "wasm-streams" @@ -5646,9 +5659,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.69" +version = "0.3.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" +checksum = "26fdeaafd9bd129f65e7c031593c24d62186301e0c72c8978fa1678be7d532c0" dependencies = [ "js-sys", "wasm-bindgen", @@ -5708,49 +5721,55 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets 0.52.6", + "windows-targets", ] [[package]] -name = "windows-sys" -version = "0.48.0" +name = "windows-registry" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +checksum = "e400001bb720a623c1c69032f8e3e4cf09984deec740f007dd2b03ec864804b0" dependencies = [ - "windows-targets 0.48.5", + "windows-result", + "windows-strings", + "windows-targets", ] [[package]] -name = "windows-sys" -version = "0.52.0" +name = "windows-result" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-strings" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" dependencies = [ - "windows-targets 0.52.6", + "windows-result", + "windows-targets", ] [[package]] name = "windows-sys" -version = "0.59.0" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.6", + "windows-targets", ] [[package]] -name = "windows-targets" -version = "0.48.5" +name = "windows-sys" +version = "0.59.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" dependencies = [ - "windows_aarch64_gnullvm 0.48.5", - "windows_aarch64_msvc 0.48.5", - "windows_i686_gnu 0.48.5", - "windows_i686_msvc 0.48.5", - "windows_x86_64_gnu 0.48.5", - "windows_x86_64_gnullvm 0.48.5", - "windows_x86_64_msvc 0.48.5", + "windows-targets", ] [[package]] @@ -5759,46 +5778,28 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm 0.52.6", - "windows_aarch64_msvc 0.52.6", - "windows_i686_gnu 0.52.6", + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", "windows_i686_gnullvm", - "windows_i686_msvc 0.52.6", - "windows_x86_64_gnu 0.52.6", - "windows_x86_64_gnullvm 0.52.6", - "windows_x86_64_msvc 0.52.6", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", ] -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" - [[package]] name = "windows_aarch64_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" -[[package]] -name = "windows_aarch64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" - [[package]] name = "windows_aarch64_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" -[[package]] -name = "windows_i686_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" - [[package]] name = "windows_i686_gnu" version = "0.52.6" @@ -5811,63 +5812,30 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" -[[package]] -name = "windows_i686_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" - [[package]] name = "windows_i686_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" -[[package]] -name = "windows_x86_64_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" - [[package]] name = "windows_x86_64_gnu" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" - [[package]] name = "windows_x86_64_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" -[[package]] -name = "windows_x86_64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" - [[package]] name = "windows_x86_64_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" -[[package]] -name = "winnow" -version = "0.5.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" -dependencies = [ - "memchr", -] - [[package]] name = "winnow" version = "0.6.18" @@ -5877,16 +5845,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "winreg" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a277a57398d4bfa075df44f501a17cfdf8542d224f0d36095a2adc7aee4ef0a5" -dependencies = [ - "cfg-if", - "windows-sys 0.48.0", -] - [[package]] name = "x25519-dalek" version = "2.0.1" @@ -5988,7 +5946,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.77", "zvariant_utils", ] @@ -6021,7 +5979,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.77", ] [[package]] @@ -6041,7 +5999,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.77", ] [[package]] @@ -6067,7 +6025,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.77", "zvariant_utils", ] @@ -6079,5 +6037,5 @@ checksum = "c51bcff7cc3dbb5055396bcf774748c3dab426b4b8659046963523cee4808340" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.77", ] diff --git a/Cargo.toml b/Cargo.toml index 1827fea2..d1b4abc4 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 = "92b4c2a469f507696fa9db3d6bdb000a761e2694" +rev = "7f4e79e2a3bb07fa189c62987a06b3f78f2e4286" features = [ "socks", "sso-login", @@ -77,14 +77,14 @@ features = [ [dependencies.matrix-sdk-ui] git = "https://github.com/matrix-org/matrix-rust-sdk.git" -rev = "92b4c2a469f507696fa9db3d6bdb000a761e2694" +rev = "7f4e79e2a3bb07fa189c62987a06b3f78f2e4286" default-features = false features = ["e2e-encryption", "native-tls"] [dependencies.ruma] # version = "0.10" git = "https://github.com/matrix-org/ruma.git" -rev = "4d3d8b46fd519012e4585ccf00dbea1eb602c028" +rev = "17f6e555528512319e706bb2cfe68a12ec5603b6" features = [ "unstable-unspecified", "client-api-c", diff --git a/src/session/model/room/event/mod.rs b/src/session/model/room/event/mod.rs index b7146a87..b1d45c33 100644 --- a/src/session/model/room/event/mod.rs +++ b/src/session/model/room/event/mod.rs @@ -22,7 +22,10 @@ use tracing::error; mod reaction_group; mod reaction_list; -pub use self::{reaction_group::ReactionGroup, reaction_list::ReactionList}; +pub use self::{ + reaction_group::{ReactionData, ReactionGroup}, + reaction_list::ReactionList, +}; use super::{ timeline::{TimelineItem, TimelineItemImpl}, Member, Room, @@ -144,6 +147,9 @@ 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 ID of the sender of this `Event`, as a string. #[property(get = Self::sender_id_string)] pub sender_id_string: PhantomData, @@ -188,6 +194,7 @@ mod imp { source: Default::default(), has_source: Default::default(), event_id_string: Default::default(), + timeline_id: Default::default(), sender_id_string: Default::default(), timestamp: Default::default(), timestamp_full: Default::default(), @@ -238,7 +245,7 @@ mod imp { impl Event { /// Set the underlying SDK timeline item of this `Event`. - pub fn set_item(&self, item: EventTimelineItem) { + pub fn set_item(&self, item: EventTimelineItem, timeline_id: &str) { let obj = self.obj(); let prev_raw = self.raw(); @@ -252,6 +259,7 @@ mod imp { obj.update_read_receipts(item.read_receipts()); self.item.replace(Some(item)); + self.timeline_id.replace(Some(timeline_id.to_owned())); if !raw_eq(prev_raw.as_ref(), self.raw().as_ref()) { obj.notify_source(); @@ -280,6 +288,7 @@ 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 @@ -316,6 +325,14 @@ mod imp { .map(ToString::to_string) } + /// The ID of this `Event` in the SDK timeline. + fn timeline_id(&self) -> String { + self.timeline_id + .borrow() + .clone() + .expect("event should always have timeline ID after construction") + } + /// The ID of the sender of this `Event`, as a string. fn sender_id_string(&self) -> String { self.item @@ -446,12 +463,12 @@ glib::wrapper! { impl Event { /// Create a new `Event` with the given SDK timeline item. - pub fn new(item: EventTimelineItem, room: &Room) -> Self { + pub fn new(item: EventTimelineItem, timeline_id: &str, room: &Room) -> Self { let obj = glib::Object::builder::() .property("room", room) .build(); - obj.imp().set_item(item); + obj.imp().set_item(item, timeline_id); obj } @@ -459,18 +476,18 @@ 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) -> bool { + pub fn try_update_with(&self, item: &EventTimelineItem, timeline_id: &str) -> bool { match &self.key() { EventKey::TransactionId(txn_id) if item.is_local_echo() && item.transaction_id() == Some(txn_id) => { - self.imp().set_item(item.clone()); + self.imp().set_item(item.clone(), timeline_id); return true; } EventKey::EventId(event_id) if !item.is_local_echo() && item.event_id() == Some(event_id) => { - self.imp().set_item(item.clone()); + self.imp().set_item(item.clone(), timeline_id); return true; } _ => {} diff --git a/src/session/model/room/event/reaction_group.rs b/src/session/model/room/event/reaction_group.rs index 79da9961..3c7a3d7c 100644 --- a/src/session/model/room/event/reaction_group.rs +++ b/src/session/model/room/event/reaction_group.rs @@ -1,9 +1,22 @@ use gtk::{gio, glib, prelude::*, subclass::prelude::*}; -use matrix_sdk_ui::timeline::ReactionGroup as SdkReactionGroup; +use indexmap::IndexMap; +use matrix_sdk_ui::timeline::ReactionInfo; +use ruma::{MilliSecondsSinceUnixEpoch, OwnedUserId}; -use super::EventKey; use crate::{prelude::*, session::model::User}; +/// A map of user ID to reaction info. +type ReactionsMap = IndexMap; + +/// Data of a reaction in a reaction group. +#[derive(Clone, Debug)] +pub struct ReactionData { + /// The sender of the reaction. + pub sender_id: OwnedUserId, + /// The timestamp of the reaction. + pub timestamp: MilliSecondsSinceUnixEpoch, +} + mod imp { use std::{ cell::{OnceCell, RefCell}, @@ -22,7 +35,7 @@ mod imp { #[property(get, construct_only)] pub key: OnceCell, /// The reactions in the group. - pub reactions: RefCell>, + pub reactions: RefCell>, /// The number of reactions in this group. #[property(get = Self::count)] pub count: PhantomData, @@ -50,17 +63,22 @@ mod imp { self.reactions .borrow() .as_ref() - .map(|reactions| reactions.senders().count()) + .map(|reactions| reactions.len()) .unwrap_or_default() as u32 } fn item(&self, position: u32) -> Option { - self.reactions.borrow().as_ref().and_then(|reactions| { - reactions - .senders() - .nth(position as usize) - .map(|sd| glib::BoxedAnyObject::new(sd.clone()).upcast()) - }) + self.reactions + .borrow() + .as_ref() + .and_then(|reactions| reactions.get_index(position as usize)) + .map(|(user_id, info)| { + glib::BoxedAnyObject::new(ReactionData { + sender_id: user_id.clone(), + timestamp: info.timestamp, + }) + .upcast() + }) } } @@ -76,8 +94,7 @@ mod imp { self.reactions .borrow() .as_ref() - .filter(|reactions| reactions.by_sender(user_id).next().is_some()) - .is_some() + .is_some_and(|reactions| reactions.contains_key(user_id)) } } } @@ -96,42 +113,20 @@ impl ReactionGroup { .build() } - /// The event ID of the reaction in this group sent by the logged-in user, - /// if any. - pub fn user_reaction_event_key(&self) -> Option { - let user = self.user(); - let user_id = user.user_id(); - - self.imp() - .reactions - .borrow() - .as_ref() - .and_then(|reactions| { - reactions - .by_sender(user_id) - .next() - .and_then(|timeline_key| match timeline_key { - (Some(txn_id), None) => Some(EventKey::TransactionId(txn_id.clone())), - (_, Some(event_id)) => Some(EventKey::EventId(event_id.clone())), - _ => None, - }) - }) - } - /// Update this group with the given reactions. - pub fn update(&self, new_reactions: SdkReactionGroup) { + pub fn update(&self, new_reactions: &ReactionsMap) { let prev_has_user = self.has_user(); let prev_count = self.count(); - let new_count = new_reactions.senders().count() as u32; + let new_count = new_reactions.len() as u32; let reactions = &self.imp().reactions; let same_reactions = match reactions.borrow().as_ref() { Some(old_reactions) => { prev_count == new_count - && new_reactions.senders().zip(old_reactions.senders()).all( - |(old_sender, new_sender)| { - old_sender.sender_id == new_sender.sender_id - && old_sender.timestamp == new_sender.timestamp + && new_reactions.iter().zip(old_reactions.iter()).all( + |((old_sender_id, old_info), (new_sender_id, new_info))| { + old_sender_id == new_sender_id + && old_info.timestamp == new_info.timestamp }, ) } @@ -142,7 +137,7 @@ impl ReactionGroup { return; } - *reactions.borrow_mut() = Some(new_reactions); + *reactions.borrow_mut() = Some(new_reactions.clone()); self.items_changed(0, prev_count, new_count); diff --git a/src/session/model/room/event/reaction_list.rs b/src/session/model/room/event/reaction_list.rs index 680348eb..c90e5172 100644 --- a/src/session/model/room/event/reaction_list.rs +++ b/src/session/model/room/event/reaction_list.rs @@ -1,5 +1,5 @@ use gtk::{gio, glib, prelude::*, subclass::prelude::*}; -use matrix_sdk_ui::timeline::BundledReactions; +use matrix_sdk_ui::timeline::ReactionsByKeyBySender; use super::ReactionGroup; use crate::session::model::User; @@ -72,7 +72,7 @@ impl ReactionList { } /// Update the reaction list with the given reactions. - pub fn update(&self, new_reactions: BundledReactions) { + pub fn update(&self, new_reactions: ReactionsByKeyBySender) { let reactions = &self.imp().reactions; let changed = { @@ -92,11 +92,11 @@ impl ReactionList { let new_len = new_reactions.len(); *reactions = new_reactions - .into_iter() + .iter() .map(|(key, reactions)| { - let group = ReactionGroup::new(&key, user); + let group = ReactionGroup::new(key, user); group.update(reactions); - (key, group) + (key.clone(), group) }) .collect(); @@ -107,7 +107,7 @@ impl ReactionList { self.items_changed(0, prev_len as u32, new_len as u32); } else { let reactions = reactions.borrow(); - for (reactions, group) in new_reactions.into_values().zip(reactions.values()) { + for (reactions, group) in new_reactions.values().zip(reactions.values()) { group.update(reactions); } } diff --git a/src/session/model/room/mod.rs b/src/session/model/room/mod.rs index fadc9236..f9334c8f 100644 --- a/src/session/model/room/mod.rs +++ b/src/session/model/room/mod.rs @@ -22,7 +22,6 @@ use ruma::{ api::client::error::{ErrorKind, RetryAfter}, events::{ receipt::{ReceiptEventContent, ReceiptType}, - relation::Annotation, room::{ avatar::RoomAvatarEventContent, encryption::SyncRoomEncryptionEvent, guest_access::GuestAccess, history_visibility::HistoryVisibility, @@ -1527,12 +1526,13 @@ impl Room { self.notify_latest_activity(); } - /// Toggle a `key` reaction for the `relates_to` event ID in this room. - pub async fn toggle_reaction(&self, key: String, relates_to: OwnedEventId) -> Result<(), ()> { + /// 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 annotation = Annotation::new(relates_to, key); + let event_timeline_id = event.timeline_id(); - let handle = spawn_tokio!(async move { timeline.toggle_reaction(&annotation).await }); + let handle = + spawn_tokio!(async move { timeline.toggle_reaction(&event_timeline_id, &key).await }); if let Err(error) = handle.await.unwrap() { error!("Could not toggle reaction: {error}"); diff --git a/src/session/model/room/timeline/mod.rs b/src/session/model/room/timeline/mod.rs index 71e75e06..e9db2a67 100644 --- a/src/session/model/room/timeline/mod.rs +++ b/src/session/model/room/timeline/mod.rs @@ -523,7 +523,8 @@ impl Timeline { }; let matrix_room = room.matrix_room().clone(); let event_id_clone = event_id.clone(); - let handle = spawn_tokio!(async move { matrix_room.event(&event_id_clone).await }); + let handle = + spawn_tokio!(async move { matrix_room.event(&event_id_clone, None).await }); match handle.await.unwrap() { Ok(room_event) => room_event.event.deserialize_as().map_err(Into::into), Err(error) => { diff --git a/src/session/model/room/timeline/timeline_item.rs b/src/session/model/room/timeline/timeline_item.rs index ae146dd1..575646ba 100644 --- a/src/session/model/room/timeline/timeline_item.rs +++ b/src/session/model/room/timeline/timeline_item.rs @@ -136,7 +136,9 @@ impl TimelineItem { /// Constructs the proper child type. pub fn new(item: &SdkTimelineItem, room: &Room) -> Self { match item.kind() { - TimelineItemKind::Event(event) => Event::new(event.clone(), room).upcast(), + TimelineItemKind::Event(event) => { + Event::new(event.clone(), item.unique_id(), room).upcast() + } TimelineItemKind::Virtual(item) => VirtualItem::new(item).upcast(), } } @@ -148,7 +150,7 @@ impl TimelineItem { match item.kind() { TimelineItemKind::Event(new_event) => { if let Some(event) = self.downcast_ref::() { - return event.try_update_with(new_event); + return event.try_update_with(new_event, item.unique_id()); } } TimelineItemKind::Virtual(_item) => { diff --git a/src/session/view/content/room_history/item_row.rs b/src/session/view/content/room_history/item_row.rs index cfac60ff..6860ef4b 100644 --- a/src/session/view/content/room_history/item_row.rs +++ b/src/session/view/content/room_history/item_row.rs @@ -907,11 +907,8 @@ impl ItemRow { let Some(event) = self.item().and_downcast::() else { return; }; - let Some(event_id) = event.event_id() else { - return; - }; - if event.room().toggle_reaction(key, event_id).await.is_err() { + if event.room().toggle_reaction(key, &event).await.is_err() { toast!(self, gettext("Could not toggle reaction")); } } diff --git a/src/session/view/content/room_history/message_row/reaction/mod.rs b/src/session/view/content/room_history/message_row/reaction/mod.rs index 70724d61..aa531aa0 100644 --- a/src/session/view/content/room_history/message_row/reaction/mod.rs +++ b/src/session/view/content/room_history/message_row/reaction/mod.rs @@ -1,6 +1,5 @@ use adw::subclass::prelude::*; use gtk::{gio, glib, glib::clone, prelude::*, CompositeTemplate}; -use matrix_sdk_ui::timeline::ReactionSenderData as SdkReactionSenderData; mod reaction_popover; @@ -9,7 +8,7 @@ use crate::{ gettext_f, ngettext_f, prelude::*, session::{ - model::{Member, MemberList, ReactionGroup}, + model::{Member, MemberList, ReactionData, ReactionGroup}, view::content::room_history::member_timestamp::MemberTimestamp, }, utils::{BoundObjectWeakRef, EMOJI_REGEX}, @@ -165,9 +164,9 @@ impl MessageReaction { break; }; - let sender_data = boxed.borrow::(); - let member = members.get_or_create(sender_data.sender_id.clone()); - let timestamp = sender_data.timestamp.as_secs().into(); + let reaction_data = boxed.borrow::(); + let member = members.get_or_create(reaction_data.sender_id.clone()); + let timestamp = reaction_data.timestamp.as_secs().into(); let sender = MemberTimestamp::new(&member, Some(timestamp)); new_senders.push(sender);