mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2025-09-11 06:13:02 +02:00
Simplify api to send notices to admin room
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
parent
84c3264c07
commit
e02fa39688
3 changed files with 32 additions and 49 deletions
|
@ -137,6 +137,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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue