mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-23 00:41:35 -05:00
Add comment about service channels for updating
This commit is contained in:
@@ -75,6 +75,12 @@ def send_broadcast_provider_message(broadcast_event_id, provider):
|
|||||||
previous_provider_messages=broadcast_event.get_earlier_provider_messages(provider),
|
previous_provider_messages=broadcast_event.get_earlier_provider_messages(provider),
|
||||||
sent=broadcast_event.sent_at_as_cap_datetime_string,
|
sent=broadcast_event.sent_at_as_cap_datetime_string,
|
||||||
expires=broadcast_event.transmitted_finishes_at_as_cap_datetime_string,
|
expires=broadcast_event.transmitted_finishes_at_as_cap_datetime_string,
|
||||||
|
# We think an alert update should always go out on the same channel that created the alert
|
||||||
|
# We recognise there is a small risk with this code here that if the services channel was
|
||||||
|
# changed between an alert being sent out and then updated, then something might go wrong
|
||||||
|
# but we are relying on service channels changing almost never, and not mid incident
|
||||||
|
# We may consider in the future, changing this such that we store the channel a broadcast was
|
||||||
|
# sent on on the broadcast message itself and pick the value from there instead of the service
|
||||||
channel=channel
|
channel=channel
|
||||||
)
|
)
|
||||||
elif broadcast_event.message_type == BroadcastEventMessageType.CANCEL:
|
elif broadcast_event.message_type == BroadcastEventMessageType.CANCEL:
|
||||||
|
|||||||
Reference in New Issue
Block a user