client-api: Add is_guest to account::whoami::Response
According to MSC3069
This commit is contained in:
parent
4ab4614ef0
commit
412452ea2e
@ -30,6 +30,10 @@ pub mod v3 {
|
|||||||
/// The device ID associated with the access token, if any.
|
/// The device ID associated with the access token, if any.
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub device_id: Option<Box<DeviceId>>,
|
pub device_id: Option<Box<DeviceId>>,
|
||||||
|
|
||||||
|
/// If `true`, the user is a guest user.
|
||||||
|
#[serde(default, skip_serializing_if = "ruma_serde::is_default")]
|
||||||
|
pub is_guest: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
error: crate::Error
|
error: crate::Error
|
||||||
@ -44,8 +48,8 @@ pub mod v3 {
|
|||||||
|
|
||||||
impl Response {
|
impl Response {
|
||||||
/// Creates a new `Response` with the given user ID.
|
/// Creates a new `Response` with the given user ID.
|
||||||
pub fn new(user_id: Box<UserId>) -> Self {
|
pub fn new(user_id: Box<UserId>, is_guest: bool) -> Self {
|
||||||
Self { user_id, device_id: None }
|
Self { user_id, device_id: None, is_guest }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user