Make display_name of RoomMember optional
This commit is contained in:
parent
2e696a114b
commit
210e3fd4a9
@ -24,6 +24,7 @@ Breaking changes:
|
|||||||
* Change the messages type that gets sent out using the `r0::client_exchange::send_event_to_device`
|
* Change the messages type that gets sent out using the `r0::client_exchange::send_event_to_device`
|
||||||
request.
|
request.
|
||||||
* Add `M_USER_DEACTIVATED` to `error::ErrorKind`
|
* Add `M_USER_DEACTIVATED` to `error::ErrorKind`
|
||||||
|
* Make `display_name` field of `r0::membership::joined_events::RoomMember` optional
|
||||||
|
|
||||||
Improvements:
|
Improvements:
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//! [GET /_matrix/client/r0/rooms/{roomId}/joined_members](https://matrix.org/docs/spec/client_server/r0.4.0.html#get-matrix-client-r0-rooms-roomid-joined-members)
|
//! [GET /_matrix/client/r0/rooms/{roomId}/joined_members](https://matrix.org/docs/spec/client_server/r0.6.0#get-matrix-client-r0-rooms-roomid-joined-members)
|
||||||
|
|
||||||
use std::collections::BTreeMap;
|
use std::collections::BTreeMap;
|
||||||
|
|
||||||
@ -31,12 +31,13 @@ ruma_api! {
|
|||||||
error: crate::Error
|
error: crate::Error
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Find out whether display_name and avatar_url are optional
|
|
||||||
/// Information about a room member.
|
/// Information about a room member.
|
||||||
#[derive(Clone, Debug, Deserialize, Serialize)]
|
#[derive(Clone, Debug, Deserialize, Serialize)]
|
||||||
pub struct RoomMember {
|
pub struct RoomMember {
|
||||||
/// The display name of the user.
|
/// The display name of the user.
|
||||||
pub display_name: String,
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
|
pub display_name: Option<String>,
|
||||||
/// The mxc avatar url of the user.
|
/// The mxc avatar url of the user.
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub avatar_url: Option<String>,
|
pub avatar_url: Option<String>,
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user