matrix_sdk::utils

Function formatted_body_from

Source
pub fn formatted_body_from(
    body: Option<&str>,
    formatted_body: Option<FormattedBody>,
) -> Option<FormattedBody>
Available on crate feature markdown only.
Expand description

Given a pair of optional body and formatted_body parameters, returns a formatted body.

Return the formatted body if available, or interpret the body parameter as markdown, if provided.