diff --git a/Cargo.toml b/Cargo.toml index 5cd84e43..37b89038 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,12 +19,12 @@ version = "0.4.0-beta.1" futures-core = "0.3.4" futures-util = "0.3.4" http = "0.2.1" -hyper = "0.13.4" +hyper = "0.13.5" hyper-tls = { version = "0.4.1", optional = true } -ruma-api = "0.15.0" -ruma-client-api = "0.7.2" -ruma-events = "0.18.0" -ruma-identifiers = "0.14.1" +ruma-api = "0.16.0-rc.1" +ruma-client-api = "0.8.0-rc.1" +ruma-events = "0.19.0-rc.1" +ruma-identifiers = "0.15.1" serde = { version = "1.0.106", features = ["derive"] } serde_json = "1.0.51" serde_urlencoded = "0.6.1" diff --git a/src/lib.rs b/src/lib.rs index fb563c6d..dca34a4f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -257,8 +257,8 @@ where let response = self .request(register::Request { auth: None, - bind_email: None, device_id: None, + inhibit_login: false, initial_device_display_name: None, kind: Some(register::RegistrationKind::Guest), password: None, @@ -267,9 +267,12 @@ where .await?; let session = Session { - access_token: response.access_token, + // since we supply inhibit_login: false above, the access token needs to be there + // TODO: maybe unwrap is not the best solution though + access_token: response.access_token.unwrap(), identification: Some(Identification { - device_id: response.device_id, + // same as access_token + device_id: response.device_id.unwrap(), user_id: response.user_id, }), }; @@ -296,8 +299,8 @@ where let response = self .request(register::Request { auth: None, - bind_email: None, device_id: None, + inhibit_login: false, initial_device_display_name: None, kind: Some(register::RegistrationKind::User), password: Some(password), @@ -306,9 +309,12 @@ where .await?; let session = Session { - access_token: response.access_token, + // since we supply inhibit_login: false above, the access token needs to be there + // TODO: maybe unwrap is not the best solution though + access_token: response.access_token.unwrap(), identification: Some(Identification { - device_id: response.device_id, + // same as access_token + device_id: response.device_id.unwrap(), user_id: response.user_id, }), };