mirror of https://github.com/zulip/zulip.git
scheduled_messages: Add defensive assert for double sends.
This commit is contained in:
parent
24bb03c89f
commit
147e296e0a
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue