Make aliases optional for global rooms query.
The server response cannot be deserialized because the aliases attribute can be missing. Wrapped the alias attribute with an Option to fix the issue.
This commit is contained in:
parent
5d5e70cf3e
commit
6f9cb39506
@ -31,7 +31,8 @@ pub mod get_public_rooms {
|
|||||||
#[derive(Clone, Debug, Deserialize, Serialize)]
|
#[derive(Clone, Debug, Deserialize, Serialize)]
|
||||||
pub struct PublicRoomsChunk {
|
pub struct PublicRoomsChunk {
|
||||||
/// Aliases of the room.
|
/// Aliases of the room.
|
||||||
pub aliases: Vec<RoomAliasId>,
|
//#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
|
pub aliases: Option<Vec<RoomAliasId>>,
|
||||||
/// The URL for the room's avatar, if one is set.
|
/// The URL for the room's avatar, if one is set.
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
#[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