Simplify api to send notices to admin room

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk 2025-04-26 23:04:58 +00:00 committed by Jade Ellis
commit 21bbee8e3c
No known key found for this signature in database
GPG key ID: 8705A2A3EBF77BD2
3 changed files with 32 additions and 49 deletions

View file

@ -142,6 +142,13 @@ impl crate::Service for Service {
}
impl Service {
/// Sends markdown notice to the admin room as the admin user.
pub async fn notice(&self, body: &str) {
self.send_message(RoomMessageEventContent::notice_markdown(body))
.await
.ok();
}
/// Sends markdown message (not an m.notice for notification reasons) to the
/// admin room as the admin user.
pub async fn send_text(&self, body: &str) {