Commit Graph

12 Commits

Author SHA1 Message Date
Tim Abbott 2afe6fea3a send_later: Fix leaking drafts for scheduled messages.
Previously, if one had started working on a message from a draft, and
then schedules it to be sent later, the draft would not be cleared
when the server accepts the request to schedule the message.
2023-05-02 12:20:30 -07:00
Aman Agrawal a90862566f scheduled_messages: Pop scheduled_messages from page_params. 2023-05-02 09:10:58 -07:00
Aman Agrawal ce3dcbab71 scheduled_messages: Remove impossible case.
This case handled client receiving an `add` event before
scheduled_messages was initialized.  Since `server_events`
is initialized after scheduled_messages is initialized,
this case was not possible.
2023-05-02 09:10:58 -07:00
Aman Agrawal ee354bb007 send_later: Only store timestamp values in `selected_send_later_timestamp`.
This removes any confusion regarding what format of time does
this variable has.
2023-05-01 22:45:03 -07:00
Aman Agrawal 1885ed783a compose: Add new banner for success message scheduled. 2023-05-01 22:45:03 -07:00
Aman Agrawal 7d373c54a9 scheduled_mesages: Use events to update scheduled message data.
This also allows to display scheduled message overlay without
fetching any data.
2023-05-01 22:45:03 -07:00
Aman Agrawal 1b60019c60 schedule: Remove 'Schedule' state of compose box.
Fixes #25340

This means that we now schedule the message simply after selecting
time if the message is valid.

Also, editing scheduled messages will now delete the scheduled
message and open compose with scheduled message.
2023-05-01 22:45:03 -07:00
Aman Agrawal 6bff396711 scheduled_messages: Remove unnecessary compose_fade call.
We just need to call clear_compose_box() here similar to when
sending a message.
2023-04-28 17:25:00 -07:00
Aman Agrawal 5baa0dc313 compose: Use the new endpoint to create scheduled messages. 2023-04-28 17:25:00 -07:00
Aman Agrawal 963fe566d7 scheduled_messages: Use scheduled_message_id instead of message_id.
Using `message_id` can be confusing for API users since it can be
mistaken for the ID of the message that will be sent.
2023-04-28 17:25:00 -07:00
Lauryn Menard f574bd4952 narrow: Fix "pm-with" narrow in scheduled messages. 2023-04-28 12:38:29 -07:00
Aman Agrawal 043d54d170 scheduled_messages: Add overlay to display and edit them.
Fixes #20971
2023-04-17 16:59:25 -07:00