Commit a07c5ae35e

a07c5ae35eab883be9ca50e773dc8a81f5f78290

parent: 5166f38071

Unsigned

Damir Jelić <poljar@termina.org.uk> · 2021-01-21 16:08 UTC

weechat-matrix: Updates for the latest rust-sdk changes

Layout: unified · split

Cargo.lock +96 −17
@@ -282,6 +282,29 @@ version = "1.0.0"
282282source = "registry+https://github.com/rust-lang/crates.io-index"
283283checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
284284
285[[package]]
286name = "chacha20"
287version = "0.6.0"
288source = "registry+https://github.com/rust-lang/crates.io-index"
289checksum = "ed8738f14471a99f0e316c327e68fc82a3611cc2895fcb604b89eedaf8f39d95"
290dependencies = [
291 "cipher",
292 "zeroize",
293]
294
295[[package]]
296name = "chacha20poly1305"
297version = "0.7.1"
298source = "registry+https://github.com/rust-lang/crates.io-index"
299checksum = "af1fc18e6d90c40164bf6c317476f2a98f04661e310e79830366b7e914c58a8e"
300dependencies = [
301 "aead",
302 "chacha20",
303 "cipher",
304 "poly1305",
305 "zeroize",
306]
307
285308[[package]]
286309name = "chrono"
287310version = "0.4.19"
@@ -1035,7 +1058,7 @@ checksum = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08"
10351058[[package]]
10361059name = "matrix-sdk"
10371060version = "0.2.0"
1038source = "git+https://github.com/matrix-org/matrix-rust-sdk/?branch=new-state-store#4af9b74776206e8bbca1a02b3e2f868752e13c83"
1061source = "git+https://github.com/matrix-org/matrix-rust-sdk/?branch=new-state-store#7d45417a1744e76bd2febdcbd901b0f061285f33"
10391062dependencies = [
10401063 "dashmap",
10411064 "futures",
@@ -1057,14 +1080,19 @@ dependencies = [
10571080[[package]]
10581081name = "matrix-sdk-base"
10591082version = "0.2.0"
1060source = "git+https://github.com/matrix-org/matrix-rust-sdk/?branch=new-state-store#4af9b74776206e8bbca1a02b3e2f868752e13c83"
1083source = "git+https://github.com/matrix-org/matrix-rust-sdk/?branch=new-state-store#7d45417a1744e76bd2febdcbd901b0f061285f33"
10611084dependencies = [
1085 "chacha20poly1305",
10621086 "dashmap",
10631087 "futures",
1088 "hmac",
10641089 "matrix-sdk-common",
10651090 "matrix-sdk-crypto",
1091 "pbkdf2",
1092 "rand 0.8.2",
10661093 "serde",
10671094 "serde_json",
1095 "sha2",
10681096 "sled",
10691097 "thiserror",
10701098 "tokio",
@@ -1075,12 +1103,13 @@ dependencies = [
10751103[[package]]
10761104name = "matrix-sdk-common"
10771105version = "0.2.0"
1078source = "git+https://github.com/matrix-org/matrix-rust-sdk/?branch=new-state-store#4af9b74776206e8bbca1a02b3e2f868752e13c83"
1106source = "git+https://github.com/matrix-org/matrix-rust-sdk/?branch=new-state-store#7d45417a1744e76bd2febdcbd901b0f061285f33"
10791107dependencies = [
10801108 "async-trait",
10811109 "futures-locks",
10821110 "instant",
10831111 "ruma",
1112 "serde",
10841113 "tokio",
10851114 "uuid",
10861115]
@@ -1088,7 +1117,7 @@ dependencies = [
10881117[[package]]
10891118name = "matrix-sdk-crypto"
10901119version = "0.2.0"
1091source = "git+https://github.com/matrix-org/matrix-rust-sdk/?branch=new-state-store#4af9b74776206e8bbca1a02b3e2f868752e13c83"
1120source = "git+https://github.com/matrix-org/matrix-rust-sdk/?branch=new-state-store#7d45417a1744e76bd2febdcbd901b0f061285f33"
10921121dependencies = [
10931122 "aes-ctr",
10941123 "aes-gcm",
@@ -1472,6 +1501,16 @@ dependencies = [
14721501 "xml-rs",
14731502]
14741503
1504[[package]]
1505name = "poly1305"
1506version = "0.6.2"
1507source = "registry+https://github.com/rust-lang/crates.io-index"
1508checksum = "4b7456bc1ad2d4cf82b3a016be4c2ac48daf11bf990c1603ebd447fe6f30fca8"
1509dependencies = [
1510 "cpuid-bool 0.2.0",
1511 "universal-hash",
1512]
1513
14751514[[package]]
14761515name = "polyval"
14771516version = "0.4.5"
@@ -1536,9 +1575,21 @@ checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03"
15361575dependencies = [
15371576 "getrandom 0.1.16",
15381577 "libc",
1539 "rand_chacha",
1540 "rand_core",
1541 "rand_hc",
1578 "rand_chacha 0.2.2",
1579 "rand_core 0.5.1",
1580 "rand_hc 0.2.0",
1581]
1582
1583[[package]]
1584name = "rand"
1585version = "0.8.2"
1586source = "registry+https://github.com/rust-lang/crates.io-index"
1587checksum = "18519b42a40024d661e1714153e9ad0c3de27cd495760ceb09710920f1098b1e"
1588dependencies = [
1589 "libc",
1590 "rand_chacha 0.3.0",
1591 "rand_core 0.6.1",
1592 "rand_hc 0.3.0",
15421593]
15431594
15441595[[package]]
@@ -1548,7 +1599,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
15481599checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402"
15491600dependencies = [
15501601 "ppv-lite86",
1551 "rand_core",
1602 "rand_core 0.5.1",
1603]
1604
1605[[package]]
1606name = "rand_chacha"
1607version = "0.3.0"
1608source = "registry+https://github.com/rust-lang/crates.io-index"
1609checksum = "e12735cf05c9e10bf21534da50a147b924d555dc7a547c42e6bb2d5b6017ae0d"
1610dependencies = [
1611 "ppv-lite86",
1612 "rand_core 0.6.1",
15521613]
15531614
15541615[[package]]
@@ -1560,13 +1621,31 @@ dependencies = [
15601621 "getrandom 0.1.16",
15611622]
15621623
1624[[package]]
1625name = "rand_core"
1626version = "0.6.1"
1627source = "registry+https://github.com/rust-lang/crates.io-index"
1628checksum = "c026d7df8b298d90ccbbc5190bd04d85e159eaf5576caeacf8741da93ccbd2e5"
1629dependencies = [
1630 "getrandom 0.2.1",
1631]
1632
15631633[[package]]
15641634name = "rand_hc"
15651635version = "0.2.0"
15661636source = "registry+https://github.com/rust-lang/crates.io-index"
15671637checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c"
15681638dependencies = [
1569 "rand_core",
1639 "rand_core 0.5.1",
1640]
1641
1642[[package]]
1643name = "rand_hc"
1644version = "0.3.0"
1645source = "registry+https://github.com/rust-lang/crates.io-index"
1646checksum = "3190ef7066a446f2e7f42e239d161e905420ccab01eb967c9eb27d21b2322a73"
1647dependencies = [
1648 "rand_core 0.6.1",
15701649]
15711650
15721651[[package]]
@@ -1939,18 +2018,18 @@ checksum = "f638d531eccd6e23b980caf34876660d38e265409d8e99b397ab71eb3612fad0"
19392018
19402019[[package]]
19412020name = "serde"
1942version = "1.0.118"
2021version = "1.0.120"
19432022source = "registry+https://github.com/rust-lang/crates.io-index"
1944checksum = "06c64263859d87aa2eb554587e2d23183398d617427327cf2b3d0ed8c69e4800"
2023checksum = "166b2349061381baf54a58e4b13c89369feb0ef2eaa57198899e2312aac30aab"
19452024dependencies = [
19462025 "serde_derive",
19472026]
19482027
19492028[[package]]
19502029name = "serde_derive"
1951version = "1.0.118"
2030version = "1.0.120"
19522031source = "registry+https://github.com/rust-lang/crates.io-index"
1953checksum = "c84d3526699cd55261af4b941e4e725444df67aa4f9e6a3564f18030d12672df"
2032checksum = "0ca2a8cb5805ce9e3b95435e3765b7b553cecc762d938d409434338386cb5775"
19542033dependencies = [
19552034 "proc-macro2",
19562035 "quote",
@@ -2144,9 +2223,9 @@ checksum = "1e81da0851ada1f3e9d4312c704aa4f8806f0f9d69faaf8df2f3464b4a9437c2"
21442223
21452224[[package]]
21462225name = "syn"
2147version = "1.0.57"
2226version = "1.0.58"
21482227source = "registry+https://github.com/rust-lang/crates.io-index"
2149checksum = "4211ce9909eb971f111059df92c45640aad50a619cf55cd76476be803c4c68e6"
2228checksum = "cc60a3d73ea6594cd712d830cc1f0390fd71542d8c8cd24e70cc54cdfd5e05d5"
21502229dependencies = [
21512230 "proc-macro2",
21522231 "quote",
@@ -2195,7 +2274,7 @@ checksum = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9"
21952274dependencies = [
21962275 "cfg-if 0.1.10",
21972276 "libc",
2198 "rand",
2277 "rand 0.7.3",
21992278 "redox_syscall",
22002279 "remove_dir_all",
22012280 "winapi",
@@ -2545,7 +2624,7 @@ version = "0.8.1"
25452624source = "registry+https://github.com/rust-lang/crates.io-index"
25462625checksum = "9fde2f6a4bea1d6e007c4ad38c6839fa71cbb63b6dbf5b595aa38dc9b1093c11"
25472626dependencies = [
2548 "rand",
2627 "rand 0.7.3",
25492628 "serde",
25502629]
25512630
src/room/mod.rs +3 −4
@@ -44,7 +44,7 @@ use std::{
4444 time::{Instant, SystemTime},
4545};
4646
47use futures::{executor::block_on, StreamExt};
47use futures::executor::block_on;
4848
4949use unicode_segmentation::UnicodeSegmentation;
5050use url::Url;
@@ -323,10 +323,9 @@ impl RoomHandle {
323323
324324 debug!("Restoring room {}", room.room_id());
325325
326 let mut matrix_members = room.joined_user_ids().await;
326 let matrix_members = room.joined_user_ids().await?;
327327
328 while let Some(user_id) = matrix_members.next().await {
329 let user_id = user_id?;
328 for user_id in matrix_members {
330329 trace!("Restoring member {}", user_id);
331330 room_buffer.members.add_or_modify(&user_id).await;
332331 }
src/server.rs +3 −2
@@ -999,8 +999,9 @@ impl InnerServer {
999999 ))
10001000 })?;
10011001
1002 let mut client_config =
1003 ClientConfig::new().store_path(self.get_server_path());
1002 let mut client_config = ClientConfig::new()
1003 .store_path(self.get_server_path())
1004 .passphrase("DEFAULT_PASSPHRASE".to_string());
10041005
10051006 if let Some(proxy) = settings.proxy.as_ref() {
10061007 client_config = client_config.proxy(proxy.as_str()).unwrap();