diff --git a/src/r0/account/register.rs b/src/r0/account/register.rs index 7c06297b..3ab0a9c5 100644 --- a/src/r0/account/register.rs +++ b/src/r0/account/register.rs @@ -1,7 +1,7 @@ //! [POST /_matrix/client/r0/register](https://matrix.org/docs/spec/client_server/r0.4.0.html#post-matrix-client-r0-register) use ruma_api::ruma_api; -use ruma_identifiers::UserId; +use ruma_identifiers::{DeviceId, UserId}; use serde::{Deserialize, Serialize}; use super::AuthenticationData; @@ -37,7 +37,7 @@ ruma_api! { /// If this does not correspond to a known client device, a new device will be created. /// The server will auto-generate a device_id if this is not specified. #[serde(skip_serializing_if = "Option::is_none")] - pub device_id: Option, + pub device_id: Option, /// A display name to assign to the newly-created device. /// /// Ignored if `device_id` corresponds to a known device. @@ -71,7 +71,7 @@ ruma_api! { /// ID of the registered device. /// /// Will be the same as the corresponding parameter in the request, if one was specified. - pub device_id: String, + pub device_id: DeviceId, } } diff --git a/src/r0/session/login.rs b/src/r0/session/login.rs index 720ad1a5..01dea6ed 100644 --- a/src/r0/session/login.rs +++ b/src/r0/session/login.rs @@ -1,7 +1,7 @@ //! [POST /_matrix/client/r0/login](https://matrix.org/docs/spec/client_server/r0.4.0.html#post-matrix-client-r0-login) use ruma_api::ruma_api; -use ruma_identifiers::UserId; +use ruma_identifiers::{DeviceId, UserId}; use serde::{Deserialize, Serialize}; ruma_api! { @@ -30,7 +30,7 @@ ruma_api! { pub address: Option, /// ID of the client device #[serde(skip_serializing_if = "Option::is_none")] - pub device_id: Option, + pub device_id: Option, } response {