feat(lua/matrix): allow sending html messages

This commit is contained in:
Ryan 2025-03-24 20:20:28 -04:00
parent 2fd0dec502
commit 709b4a1d0d
Signed by: ErrorNoInternet
GPG Key ID: 2486BFB7B1E6A4A3

View File

@ -80,5 +80,15 @@ impl UserData for Room {
.map_err(Error::external) .map_err(Error::external)
.map(|response| response.event_id.to_string()) .map(|response| response.event_id.to_string())
}); });
m.add_async_method(
"send_html",
async |_, this, (body, html_body): (String, String)| {
this.0
.send(RoomMessageEventContent::text_html(body, html_body))
.await
.map_err(Error::external)
.map(|response| response.event_id.to_string())
},
);
} }
} }