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

Ability to delete a post diff from its history #9109

Closed
julianlam opened this issue Dec 14, 2020 · 0 comments
Closed

Ability to delete a post diff from its history #9109

julianlam opened this issue Dec 14, 2020 · 0 comments
Assignees
Milestone

Comments

@julianlam
Copy link
Member

julianlam commented Dec 14, 2020

Available to moderators (of that pid's category), gmods, and administrators only (hint: privileges.users.isModerator), allow deletion of a post's history entry (one at a time).

Suggested API route to add: DELETE /api/v3/posts/:pid/diffs/:timestamp

Caveat: The way post diffs work, every time a post is edited, a diff is made from the old version to the new version (or perhaps it is the other way around). This minimizes the amount of data we store, but means we cannot arbitrarily delete diffs in the middle, because it breaks the chain and older revisions will no longer be able to be restored. The easiest solution may just be to soft delete them internally, and not show them in the frontend (nor can it be restored if requested).

Alternatively if you really want to make them permanent, you could re-generate the older diffs upon deletion. Up to you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants