Matrix send message error

This commit is contained in:
Pascal Engélibert 2022-10-25 18:30:54 +02:00
parent b52dff12fe
commit fa306e9542
Signed by: tuxmain
GPG key ID: 3504BC6D362F7DCA

View file

@ -55,14 +55,17 @@ impl Notifier {
match &self.matrix { match &self.matrix {
None => {} None => {}
Some(OptionSince::Some((_client, room))) => { Some(OptionSince::Some((_client, room))) => {
room.send( if let Err(e) = room
ruma::events::room::message::RoomMessageEventContent::text_plain( .send(
"New comment.", ruma::events::room::message::RoomMessageEventContent::text_plain(
), "New comment.",
None, ),
) None,
.await )
.unwrap(); .await
{
error!("Sending Matrix message: {:?}", e);
}
} }
Some(OptionSince::NoneSince(earlier)) => { Some(OptionSince::NoneSince(earlier)) => {
if SystemTime::now().duration_since(*earlier).unwrap() if SystemTime::now().duration_since(*earlier).unwrap()