Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Edit and delete messages that were scheduled #3

Open
ChaseC99 opened this issue Jun 29, 2021 · 0 comments
Open

Edit and delete messages that were scheduled #3

ChaseC99 opened this issue Jun 29, 2021 · 0 comments
Assignees
Labels

Comments

@ChaseC99
Copy link
Member

Currently messages that were sent via Schedule Message are not included in the log. Therefore we can't edit or delete them on the /editMessage page.

This is slightly complicated to log because a message scheduled at (example) 1624940820 may not actually send until 1624940820.001500.

Proposal on how to handle this:

  • A message to the log with the text, channel, scheduled ts, and a flag indicating that it is scheduled
  • Every time we call loadLog(), if there is a scheduled message and we are past the scheduled send time, search the channel for a message containing the text around the scheduled ts.
  • If the message is found, update the log message to match the normal message format with its actual ts. Else delete the scheduled message (if it's not there now, no reason searching for it later. Something had to have gone wrong....)

Edge cases to consider

  • scheduled message is deleted before it's sent -> make sure to delete the log message
  • scheduled message is edited before it's sent -> update the text of the log message
@ChaseC99 ChaseC99 self-assigned this Jun 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant