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

Edge case: redrafted attachments could be cleaned up while user is composing #10314

Open
DrewFitz opened this issue Mar 18, 2019 · 0 comments
Open
Labels
suggestion Feature suggestion

Comments

@DrewFitz
Copy link

When a user delete-and-redrafts a post, the original status is deleted, but the media attachments are left behind to be reattached to the new status. Since the attachments don't get an updated timestamp when this happens, it stands to reason that the temporarily orphaned attachments could get cleaned up by the server while the user is redrafting the status. From what I could gather from reading the source, this is only a concern if the user is redrafting a toot from 10+ days ago (as the attachments will have a createdAt timestamp of 10+ days ago and be candidates for the cleanup script to delete).

I propose that this could be fixed by either of the following (from my most- to least-desired):

  • making delete-and-redrafts an API-level feature
  • updating the attachments' createdAt timestamps when deleting their attached status to extend the user's window for safely redrafting the status
  • returning an error when posting a status with media ID's that aren't valid, instead of the current behavior of silently ignoring those attachments
  • disallow reusing of media IDs to make it explicit to API consumers that a delete-and-redraft feature needs to download and reupload the media attachments for the new status
@vmstan vmstan added the suggestion Feature suggestion label Nov 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
suggestion Feature suggestion
Projects
None yet
Development

No branches or pull requests

2 participants