only send zendesk P1 for alerts

we don't need to be re-notified when someone clicks cancel
This commit is contained in:
Leo Hemsted
2021-04-08 12:22:18 +01:00
parent 9bd8c0239c
commit 4a5b1c23bd
2 changed files with 23 additions and 1 deletions

View File

@@ -112,7 +112,10 @@ def send_broadcast_event(broadcast_event_id):
broadcast_event = dao_get_broadcast_event_by_id(broadcast_event_id)
if current_app.config['NOTIFY_ENVIRONMENT'] == 'live':
if (
current_app.config['NOTIFY_ENVIRONMENT'] == 'live' and
broadcast_event.message_type == BroadcastEventMessageType.ALERT
):
broadcast_message = broadcast_event.broadcast_message
# raise a P1 to alert team that broadcast is going out.
message = '\n'.join([