Add a convenience constructor to FormattedBody
This commit is contained in:
parent
c8b1aad189
commit
76c2f5c449
@ -292,6 +292,13 @@ pub struct FormattedBody {
|
|||||||
pub body: String,
|
pub body: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl FormattedBody {
|
||||||
|
/// Creates a new HTML-formatted message body.
|
||||||
|
pub fn html(body: String) -> Self {
|
||||||
|
Self { format: MessageFormat::Html, body }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// The payload for a text message.
|
/// The payload for a text message.
|
||||||
#[derive(Clone, Debug, Deserialize, Serialize)]
|
#[derive(Clone, Debug, Deserialize, Serialize)]
|
||||||
pub struct TextMessageEventContent {
|
pub struct TextMessageEventContent {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user