mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-23 00:41:35 -05:00
Favour new "areas" format for PagerDuty alerts
Broadcasts created via the API [1] and the Admin app [2] should both now have this field set. It's also more informative to show this, and broadcasts created via the API don't have IDs anyway. There's a small risk that an old broadcast that gets approved won't have this data, but it's for information only and we intend to backfill all old broadcasts in the near future. [1]:023a06d5fb[2]:7dbe3afa19
This commit is contained in:
@@ -135,7 +135,7 @@ def send_broadcast_event(broadcast_event_id):
|
||||
f'https://www.notifications.service.gov.uk/services/{broadcast_message.service_id}/current-alerts/{broadcast_message.id}', # noqa
|
||||
'',
|
||||
f'This broacast has been sent on channel {broadcast_message.service.broadcast_channel}.',
|
||||
f'This broadcast is targeted at areas {broadcast_message.areas.get("ids", broadcast_message.areas.get("areas"))}.', # noqa
|
||||
f'This broadcast is targeted at areas {broadcast_message.areas.get("names", [])}.', # noqa
|
||||
''
|
||||
f'This broadcast\'s content starts "{broadcast_message.content[:100]}"'
|
||||
'',
|
||||
|
||||
Reference in New Issue
Block a user