feat: Add SlidingSyncRoom::avatar

It's been recently added in the specification, 50ae2c8d65...kegan/sync-v3.
This commit is contained in:
Ivan Enderlin 2023-07-26 16:02:28 +02:00 committed by GitHub
parent 3dac70ead9
commit 201f0027d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View File

@ -17,7 +17,7 @@ use ruma_common::{
},
metadata,
serde::{duration::opt_ms, Raw},
DeviceKeyAlgorithm, OwnedRoomId,
DeviceKeyAlgorithm, OwnedMxcUri, OwnedRoomId,
};
use serde::{Deserialize, Serialize};
@ -419,6 +419,10 @@ pub struct SlidingSyncRoom {
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
/// The avatar of the room.
#[serde(skip_serializing_if = "Option::is_none")]
pub avatar: Option<OwnedMxcUri>,
/// Was this an initial response.
#[serde(skip_serializing_if = "Option::is_none")]
pub initial: Option<bool>,

View File

@ -14,7 +14,6 @@ type Result<T, E = MxcUriError> = std::result::Result<T, E>;
/// A URI that should be a Matrix-spec compliant [MXC URI].
///
/// [MXC URI]: https://spec.matrix.org/latest/client-server-api/#matrix-content-mxc-uris
#[repr(transparent)]
#[derive(PartialEq, Eq, PartialOrd, Ord, Hash, IdZst)]
pub struct MxcUri(str);