From 709b4a1d0d5ef8b8ae32bf89b4737cf9db1d6043 Mon Sep 17 00:00:00 2001 From: ErrorNoInternet Date: Mon, 24 Mar 2025 20:20:28 -0400 Subject: [PATCH] feat(lua/matrix): allow sending html messages --- src/lua/matrix/room.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/lua/matrix/room.rs b/src/lua/matrix/room.rs index 7512a77..1517a24 100644 --- a/src/lua/matrix/room.rs +++ b/src/lua/matrix/room.rs @@ -80,5 +80,15 @@ impl UserData for Room { .map_err(Error::external) .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()) + }, + ); } }