ContentUtils

object ContentUtils

Functions

Link copied to clipboard
fun ensureCorrectFormattedBodyInTextReply(messageTextContent: MessageTextContent, originalFormattedBody: String): MessageTextContent

Not every client sends a formatted body in the last edited event since this is not required in the Matrix specification. We must ensure there is one so that it is still considered as a reply when rendering the message.

Link copied to clipboard
fun extractUsefulTextFromHtmlReply(repliedBody: String): String
Link copied to clipboard
fun extractUsefulTextFromReply(repliedBody: String): String
Link copied to clipboard
fun formatSpoilerTextFromHtml(formattedBody: String): String