[fractal] chore: Update matrix-sdk to 0.6.0 and ruma to 0.7.4



commit 91085e91df913cac4ee909d0b188906f44d93fa9
Author: Kévin Commaille <zecakeh tedomum fr>
Date:   Tue Oct 4 17:03:01 2022 +0200

    chore: Update matrix-sdk to 0.6.0 and ruma to 0.7.4
    
    Part-of: <https://gitlab.gnome.org/GNOME/fractal/-/merge_requests/1177>

 Cargo.lock                                         | 144 ++++++---------------
 Cargo.toml                                         |   4 +-
 .../security_page/import_export_keys_subpage.rs    |   4 +-
 src/session/room_creation/mod.rs                   |  10 +-
 src/session/room_list.rs                           |   2 +-
 5 files changed, 53 insertions(+), 111 deletions(-)
---
diff --git a/Cargo.lock b/Cargo.lock
index 5e273e07b..609f4f2e2 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -719,38 +719,14 @@ dependencies = [
  "zeroize",
 ]
 
-[[package]]
-name = "darling"
-version = "0.12.4"
-source = "registry+https://github.com/rust-lang/crates.io-index";
-checksum = "5f2c43f534ea4b0b049015d00269734195e6d3f0f6635cb692251aca6f9f8b3c"
-dependencies = [
- "darling_core 0.12.4",
- "darling_macro 0.12.4",
-]
-
 [[package]]
 name = "darling"
 version = "0.14.1"
 source = "registry+https://github.com/rust-lang/crates.io-index";
 checksum = "4529658bdda7fd6769b8614be250cdcfc3aeb0ee72fe66f9e41e5e5eb73eac02"
 dependencies = [
- "darling_core 0.14.1",
- "darling_macro 0.14.1",
-]
-
-[[package]]
-name = "darling_core"
-version = "0.12.4"
-source = "registry+https://github.com/rust-lang/crates.io-index";
-checksum = "8e91455b86830a1c21799d94524df0845183fa55bafd9aa137b01c7d1065fa36"
-dependencies = [
- "fnv",
- "ident_case",
- "proc-macro2 1.0.43",
- "quote 1.0.21",
- "strsim 0.10.0",
- "syn 1.0.99",
+ "darling_core",
+ "darling_macro",
 ]
 
 [[package]]
@@ -767,24 +743,13 @@ dependencies = [
  "syn 1.0.99",
 ]
 
-[[package]]
-name = "darling_macro"
-version = "0.12.4"
-source = "registry+https://github.com/rust-lang/crates.io-index";
-checksum = "29b5acf0dea37a7f66f7b25d2c5e93fd46f8f6968b1a5d7a3e02e97768afc95a"
-dependencies = [
- "darling_core 0.12.4",
- "quote 1.0.21",
- "syn 1.0.99",
-]
-
 [[package]]
 name = "darling_macro"
 version = "0.14.1"
 source = "registry+https://github.com/rust-lang/crates.io-index";
 checksum = "ddfc69c5bfcbd2fc09a0f38451d2daf0e372e367986a83906d1b0dbc88134fb5"
 dependencies = [
- "darling_core 0.14.1",
+ "darling_core",
  "quote 1.0.21",
  "syn 1.0.99",
 ]
@@ -832,34 +797,13 @@ dependencies = [
  "syn 1.0.99",
 ]
 
-[[package]]
-name = "derive_builder"
-version = "0.10.2"
-source = "registry+https://github.com/rust-lang/crates.io-index";
-checksum = "d13202debe11181040ae9063d739fa32cfcaaebe2275fe387703460ae2365b30"
-dependencies = [
- "derive_builder_macro 0.10.2",
-]
-
 [[package]]
 name = "derive_builder"
 version = "0.11.2"
 source = "registry+https://github.com/rust-lang/crates.io-index";
 checksum = "d07adf7be193b71cc36b193d0f5fe60b918a3a9db4dad0449f57bcfd519704a3"
 dependencies = [
- "derive_builder_macro 0.11.2",
-]
-
-[[package]]
-name = "derive_builder_core"
-version = "0.10.2"
-source = "registry+https://github.com/rust-lang/crates.io-index";
-checksum = "66e616858f6187ed828df7c64a6d71720d83767a7f19740b2d1b6fe6327b36e5"
-dependencies = [
- "darling 0.12.4",
- "proc-macro2 1.0.43",
- "quote 1.0.21",
- "syn 1.0.99",
+ "derive_builder_macro",
 ]
 
 [[package]]
@@ -868,29 +812,19 @@ version = "0.11.2"
 source = "registry+https://github.com/rust-lang/crates.io-index";
 checksum = "1f91d4cfa921f1c05904dc3c57b4a32c38aed3340cce209f3a6fd1478babafc4"
 dependencies = [
- "darling 0.14.1",
+ "darling",
  "proc-macro2 1.0.43",
  "quote 1.0.21",
  "syn 1.0.99",
 ]
 
-[[package]]
-name = "derive_builder_macro"
-version = "0.10.2"
-source = "registry+https://github.com/rust-lang/crates.io-index";
-checksum = "58a94ace95092c5acb1e97a7e846b310cfbd499652f72297da7493f618a98d73"
-dependencies = [
- "derive_builder_core 0.10.2",
- "syn 1.0.99",
-]
-
 [[package]]
 name = "derive_builder_macro"
 version = "0.11.2"
 source = "registry+https://github.com/rust-lang/crates.io-index";
 checksum = "8f0314b72bed045f3a68671b3c86328386762c93f82d98c65c3cb5e5f573dd68"
 dependencies = [
- "derive_builder_core 0.11.2",
+ "derive_builder_core",
  "syn 1.0.99",
 ]
 
@@ -2155,7 +2089,8 @@ dependencies = [
 [[package]]
 name = "indexed_db_futures"
 version = "0.2.3"
-source = 
"git+https://github.com/Hywan/rust-indexed-db?branch=feat-factory-nodejs#5dab67890cea0ab88b967031adc09179a537d77c";
+source = "registry+https://github.com/rust-lang/crates.io-index";
+checksum = "d26ac735f676c52305becf53264b91cea9866a8de61ccbf464405b377b9cbca9"
 dependencies = [
  "cfg-if 1.0.0",
  "js-sys",
@@ -2526,8 +2461,9 @@ dependencies = [
 
 [[package]]
 name = "matrix-sdk"
-version = "0.5.0"
-source = "git+https://github.com/matrix-org/matrix-rust-sdk.git#34ed04958f4c7c1a4a6957cc33f27a5c637d8790";
+version = "0.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index";
+checksum = "37a075b2690bc305ca02755a868cfa9f9779cfc2353f7184f3cf1a0a405ecdb2"
 dependencies = [
  "anymap2",
  "async-once-cell",
@@ -2536,9 +2472,8 @@ dependencies = [
  "backoff",
  "bytes",
  "dashmap",
- "derive_builder 0.10.2",
+ "derive_builder",
  "event-listener",
- "futures-channel",
  "futures-core",
  "futures-signals",
  "futures-util",
@@ -2565,8 +2500,9 @@ dependencies = [
 
 [[package]]
 name = "matrix-sdk-base"
-version = "0.5.1"
-source = "git+https://github.com/matrix-org/matrix-rust-sdk.git#34ed04958f4c7c1a4a6957cc33f27a5c637d8790";
+version = "0.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index";
+checksum = "de51f1662779739e7a74677f37cdf744a2c82dfb7618e89d5e18967a4540181b"
 dependencies = [
  "async-stream",
  "async-trait",
@@ -2589,8 +2525,9 @@ dependencies = [
 
 [[package]]
 name = "matrix-sdk-common"
-version = "0.5.0"
-source = "git+https://github.com/matrix-org/matrix-rust-sdk.git#34ed04958f4c7c1a4a6957cc33f27a5c637d8790";
+version = "0.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index";
+checksum = "b85a6a743cc9dcf9385e61a26db78276078beddd27f3762d9d82baa2030695f1"
 dependencies = [
  "async-lock",
  "futures-core",
@@ -2605,8 +2542,9 @@ dependencies = [
 
 [[package]]
 name = "matrix-sdk-crypto"
-version = "0.5.0"
-source = "git+https://github.com/matrix-org/matrix-rust-sdk.git#34ed04958f4c7c1a4a6957cc33f27a5c637d8790";
+version = "0.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index";
+checksum = "68fa699e8dd54578a4b92e3fcd18a50da8e415a0c042da1706b0330fc2d8f949"
 dependencies = [
  "aes",
  "async-trait",
@@ -2635,14 +2573,15 @@ dependencies = [
 
 [[package]]
 name = "matrix-sdk-indexeddb"
-version = "0.1.0"
-source = "git+https://github.com/matrix-org/matrix-rust-sdk.git#34ed04958f4c7c1a4a6957cc33f27a5c637d8790";
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index";
+checksum = "7847d36bba832bc787214323bc042b71dca7fdf2aee9f0e3eb573b64f2f7eb7f"
 dependencies = [
  "anyhow",
  "async-trait",
  "base64",
  "dashmap",
- "derive_builder 0.11.2",
+ "derive_builder",
  "futures-util",
  "getrandom 0.2.7",
  "indexed_db_futures",
@@ -2661,8 +2600,9 @@ dependencies = [
 
 [[package]]
 name = "matrix-sdk-qrcode"
-version = "0.3.0"
-source = "git+https://github.com/matrix-org/matrix-rust-sdk.git#34ed04958f4c7c1a4a6957cc33f27a5c637d8790";
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index";
+checksum = "2d517e51c23cb47139e25452289c3c57b3005565c066a98d196eac8d8d2d2959"
 dependencies = [
  "base64",
  "byteorder",
@@ -2674,13 +2614,14 @@ dependencies = [
 
 [[package]]
 name = "matrix-sdk-sled"
-version = "0.1.0"
-source = "git+https://github.com/matrix-org/matrix-rust-sdk.git#34ed04958f4c7c1a4a6957cc33f27a5c637d8790";
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index";
+checksum = "5ded5a703ad8a82b8edfde808228711315c8761a5fbf7ac2b98ab4951dadd066"
 dependencies = [
  "async-stream",
  "async-trait",
  "dashmap",
- "derive_builder 0.11.2",
+ "derive_builder",
  "fs_extra",
  "futures-core",
  "futures-util",
@@ -2699,8 +2640,9 @@ dependencies = [
 
 [[package]]
 name = "matrix-sdk-store-encryption"
-version = "0.1.0"
-source = "git+https://github.com/matrix-org/matrix-rust-sdk.git#34ed04958f4c7c1a4a6957cc33f27a5c637d8790";
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index";
+checksum = "9ddee75c3cca58f3a323283dc4e849d19d52988903f907ed0fb53dcad5d6fd25"
 dependencies = [
  "blake3",
  "chacha20poly1305",
@@ -3724,9 +3666,9 @@ dependencies = [
 
 [[package]]
 name = "ruma"
-version = "0.7.1"
+version = "0.7.4"
 source = "registry+https://github.com/rust-lang/crates.io-index";
-checksum = "3daa593bddbe225bc78760329afaba54d0c653e015f18ce6405fa723ec0f34d5"
+checksum = "8dc348e3a4a18abc4e97fffa5e2e623f6edd50ba3a1dd5f47eb249fea713b69f"
 dependencies = [
  "assign",
  "js_int",
@@ -3739,9 +3681,9 @@ dependencies = [
 
 [[package]]
 name = "ruma-client-api"
-version = "0.15.0"
+version = "0.15.1"
 source = "registry+https://github.com/rust-lang/crates.io-index";
-checksum = "a2709c891d277ef94d56657c3ec92ed464779dbfff055e518425eedf11d9ecb7"
+checksum = "5bcfd3a3853ffdd151fc228441dd9c9e3d835ac85560dface7abda50b3888791"
 dependencies = [
  "assign",
  "bytes",
@@ -3756,9 +3698,9 @@ dependencies = [
 
 [[package]]
 name = "ruma-common"
-version = "0.10.1"
+version = "0.10.3"
 source = "registry+https://github.com/rust-lang/crates.io-index";
-checksum = "67dab5e934f2e280875cf3a863c14d876265bda169e4fd18334058e7307142d6"
+checksum = "a1e629a01f359234798531a99ba83997abd4c15a65b5bcb8354c4171b59c25be"
 dependencies = [
  "base64",
  "bytes",
@@ -3811,9 +3753,9 @@ dependencies = [
 
 [[package]]
 name = "ruma-macros"
-version = "0.10.1"
+version = "0.10.3"
 source = "registry+https://github.com/rust-lang/crates.io-index";
-checksum = "3b3e5a61180840ebfdeb4bcc4dc4a0d0c21aa22f587360b16b785c79058d99f3"
+checksum = "9f7cd8cf8771aaca36042fb7659f4647b05e74a2058d843474dde5e51a56cd85"
 dependencies = [
  "once_cell",
  "proc-macro-crate",
diff --git a/Cargo.toml b/Cargo.toml
index 703a88a42..8a255d9ac 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -73,11 +73,11 @@ package = "libshumate"
 version = "0.1.1"
 
 [dependencies.matrix-sdk]
-git = "https://github.com/matrix-org/matrix-rust-sdk.git";
+version = "0.6.0"
 features = ["socks", "sso-login", "markdown", "qrcode", "experimental-timeline"]
 
 [dependencies.ruma]
-version = "0.7.1"
+version = "0.7.4"
 features = [
     "unstable-pre-spec",
     "client-api-c",
diff --git a/src/session/account_settings/security_page/import_export_keys_subpage.rs 
b/src/session/account_settings/security_page/import_export_keys_subpage.rs
index 9ed93ea4b..e4fc9608c 100644
--- a/src/session/account_settings/security_page/import_export_keys_subpage.rs
+++ b/src/session/account_settings/security_page/import_export_keys_subpage.rs
@@ -385,13 +385,13 @@ impl ImportExportKeysSubpage {
         let handle = spawn_tokio!(async move {
             if is_export {
                 encryption
-                    .export_keys(file_path, passphrase.as_str(), |_| true)
+                    .export_room_keys(file_path, passphrase.as_str(), |_| true)
                     .await
                     .map(|_| 0usize)
                     .map_err::<Box<dyn std::error::Error + Send>, _>(|error| Box::new(error))
             } else {
                 encryption
-                    .import_keys(file_path, passphrase.as_str())
+                    .import_room_keys(file_path, passphrase.as_str())
                     .await
                     .map(|res| res.imported_count)
                     .map_err::<Box<dyn std::error::Error + Send>, _>(|error| Box::new(error))
diff --git a/src/session/room_creation/mod.rs b/src/session/room_creation/mod.rs
index 91e8c3193..1216833d3 100644
--- a/src/session/room_creation/mod.rs
+++ b/src/session/room_creation/mod.rs
@@ -13,7 +13,7 @@ use matrix_sdk::{
         },
         assign,
     },
-    Error, HttpError, RumaApiError,
+    HttpError, RumaApiError,
 };
 
 use crate::{
@@ -221,7 +221,7 @@ impl RoomCreation {
                 match handle.await.unwrap() {
                         Ok(response) => {
                             if let Some(session) = obj.session() {
-                                let room = session.room_list().get_wait(response.room_id()).await;
+                                let room = session.room_list().get_wait(&response.room_id).await;
                                 session.select_room(room);
                             }
                             obj.close();
@@ -238,7 +238,7 @@ impl RoomCreation {
     }
 
     /// Display the error that occurred during creation
-    fn handle_error(&self, error: Error) {
+    fn handle_error(&self, error: HttpError) {
         let priv_ = self.imp();
 
         priv_.create_button.set_loading(false);
@@ -246,9 +246,9 @@ impl RoomCreation {
         priv_.cancel_button.set_sensitive(true);
 
         // Treat the room address already taken error special
-        if let Error::Http(HttpError::Api(FromHttpResponseError::Server(ServerError::Known(
+        if let HttpError::Api(FromHttpResponseError::Server(ServerError::Known(
             RumaApiError::ClientApi(ref client_error),
-        )))) = error
+        ))) = error
         {
             if client_error.kind == RumaClientErrorKind::RoomInUse {
                 priv_.room_address.add_css_class("error");
diff --git a/src/session/room_list.rs b/src/session/room_list.rs
index 2c54fbdcc..7c7dbf52a 100644
--- a/src/session/room_list.rs
+++ b/src/session/room_list.rs
@@ -314,7 +314,7 @@ impl RoomList {
             glib::PRIORITY_DEFAULT_IDLE,
             clone!(@weak self as obj => async move {
                 match handle.await.unwrap() {
-                    Ok(response) => obj.pending_rooms_replace_or_remove(&identifier, response.room_id()),
+                    Ok(response) => obj.pending_rooms_replace_or_remove(&identifier, &response.room_id),
                     Err(error) => {
                         obj.pending_rooms_remove(&identifier);
                         error!("Joining room {} failed: {}", identifier, error);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]