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 {
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()