Extend soft delete to draft, pending, and private post statuses #2860
+261
−13
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Proposed changes:
Extends the soft delete functionality (FEP-4f05) to also send Delete activities when a federated post's status is changed to "draft", "pending", or "private". Previously, changing a post to draft would send an Update activity with placeholder content "(This post is being modified)". Now it sends a proper Delete activity and returns a Tombstone, consistent with other soft delete scenarios.
Changes
is_post_disabled()to handle draft/pending/private statuses for federated postsinvalidate_existing_items()to invalidate pending Delete activities when Create/Update is added (prevents sending Delete after re-publish)Soft Delete Behavior
When a federated post is changed to draft/pending/private:
Re-publish Handling
When a soft-deleted post is re-published:
This follows the same pattern as visibility changes to local/private from #2824.
Other information:
Testing instructions:
Soft Delete
activitypub_statusmeta is set to "deleted"Re-publishing (before Delete is sent)
Re-publishing (after Delete is sent)
Changelog entry
Changelog entry has been added manually.