scheduled_messages: Add defensive assert for double sends.

This commit is contained in:
Tim Abbott 2023-05-04 16:17:12 -07:00
parent 24bb03c89f
commit 147e296e0a
1 changed files with 1 additions and 0 deletions

View File

@ -205,6 +205,7 @@ def construct_send_request(scheduled_message: ScheduledMessage) -> SendMessageRe
def send_scheduled_message(scheduled_message: ScheduledMessage) -> None:
assert not scheduled_message.delivered
message_send_request = construct_send_request(scheduled_message)
do_send_messages([message_send_request])
scheduled_message.delivered = True