don't send message for nothing

This commit is contained in:
HgO 2022-07-11 23:43:27 +02:00
parent bb14e9dda8
commit 19d42fc1af

View file

@ -126,6 +126,7 @@ class Command:
f"Sorry, I couldn't find {count_alert_not_found} alerts, and thus I couldn't acknowledge them.", f"Sorry, I couldn't find {count_alert_not_found} alerts, and thus I couldn't acknowledge them.",
) )
if count_created_silences > 0:
await send_text_to_room( await send_text_to_room(
self.client, self.client,
self.room.room_id, self.room.room_id,
@ -179,6 +180,7 @@ class Command:
f"Sorry, I couldn't find {count_alert_not_found} alerts, and thus I couldn't unacknowledge them.", f"Sorry, I couldn't find {count_alert_not_found} alerts, and thus I couldn't unacknowledge them.",
) )
if count_removed_silences > 0:
await send_text_to_room( await send_text_to_room(
self.client, self.client,
self.room.room_id, self.room.room_id,