From 71b358ccd617638f17d9070f3ed846e59eb60387 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Commaille?= Date: Sun, 4 Apr 2021 09:15:10 +0200 Subject: [PATCH] common: Replace String with MxcUri for avatar_url --- ruma-common/CHANGELOG.md | 5 +++++ ruma-common/src/directory.rs | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ruma-common/CHANGELOG.md b/ruma-common/CHANGELOG.md index 56b290ff..ccdd4746 100644 --- a/ruma-common/CHANGELOG.md +++ b/ruma-common/CHANGELOG.md @@ -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: diff --git a/ruma-common/src/directory.rs b/ruma-common/src/directory.rs index 1bb904db..30cb0779 100644 --- a/ruma-common/src/directory.rs +++ b/ruma-common/src/directory.rs @@ -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, + pub avatar_url: Option, } /// Initial set of mandatory fields of `PublicRoomsChunk`.