From fa306e9542eada797927ef74e7fe98f836c91748 Mon Sep 17 00:00:00 2001 From: tuxmain Date: Tue, 25 Oct 2022 18:30:54 +0200 Subject: [PATCH] Matrix send message error --- src/notify.rs | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/notify.rs b/src/notify.rs index 974c385..129ae39 100644 --- a/src/notify.rs +++ b/src/notify.rs @@ -55,14 +55,17 @@ impl Notifier { match &self.matrix { None => {} Some(OptionSince::Some((_client, room))) => { - room.send( - ruma::events::room::message::RoomMessageEventContent::text_plain( - "New comment.", - ), - None, - ) - .await - .unwrap(); + if let Err(e) = room + .send( + ruma::events::room::message::RoomMessageEventContent::text_plain( + "New comment.", + ), + None, + ) + .await + { + error!("Sending Matrix message: {:?}", e); + } } Some(OptionSince::NoneSince(earlier)) => { if SystemTime::now().duration_since(*earlier).unwrap()