diff --git a/ruma-events/src/room/message.rs b/ruma-events/src/room/message.rs index f573f51e..ef9ce944 100644 --- a/ruma-events/src/room/message.rs +++ b/ruma-events/src/room/message.rs @@ -294,8 +294,8 @@ pub struct FormattedBody { impl FormattedBody { /// Creates a new HTML-formatted message body. - pub fn html(body: String) -> Self { - Self { format: MessageFormat::Html, body } + pub fn html(body: impl Into) -> Self { + Self { format: MessageFormat::Html, body: body.into() } } }