mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-05-03 05:25:24 -04:00
Merge pull request #2425 from matrix-org/jonny/message-content-from-html
Add binding to create message events from HTML
This commit is contained in:
@@ -52,6 +52,14 @@ pub fn message_event_content_from_markdown(md: String) -> Arc<RoomMessageEventCo
|
||||
Arc::new(RoomMessageEventContent::text_markdown(md))
|
||||
}
|
||||
|
||||
#[uniffi::export]
|
||||
pub fn message_event_content_from_html(
|
||||
body: String,
|
||||
html_body: String,
|
||||
) -> Arc<RoomMessageEventContent> {
|
||||
Arc::new(RoomMessageEventContent::text_html(body, html_body))
|
||||
}
|
||||
|
||||
#[uniffi::export(callback_interface)]
|
||||
pub trait TimelineListener: Sync + Send {
|
||||
fn on_update(&self, diff: Vec<Arc<TimelineDiff>>);
|
||||
|
||||
Reference in New Issue
Block a user