common: Replace String with MxcUri for avatar_url

This commit is contained in:
Kévin Commaille 2021-04-04 09:15:10 +02:00 committed by Kévin Commaille
parent 62929ce5d1
commit 71b358ccd6
2 changed files with 7 additions and 2 deletions

View File

@ -1,5 +1,10 @@
# [unreleased]
Breaking changes:
* Use `ruma_identifiers::MxcUri` instead of `String` for `avatar_url` field in
`directory::PublicRoomsChunk`
# 0.3.1
Bug fixes:

View File

@ -3,7 +3,7 @@
use std::fmt;
use js_int::UInt;
use ruma_identifiers::{RoomAliasId, RoomId};
use ruma_identifiers::{MxcUri, RoomAliasId, RoomId};
use ruma_serde::Outgoing;
use serde::{
de::{Error, MapAccess, Visitor},
@ -55,7 +55,7 @@ pub struct PublicRoomsChunk {
feature = "compat",
serde(default, deserialize_with = "ruma_serde::empty_string_as_none")
)]
pub avatar_url: Option<String>,
pub avatar_url: Option<MxcUri>,
}
/// Initial set of mandatory fields of `PublicRoomsChunk`.