Conversation
Owner-only delete_status removes a local status, cascades cleanup of
feed/boost/liked rows alongside the FK cascade on `statuses` (media,
edit_history, status_hashtags, pinned_statuses), and emits a
`Delete(Note)` activity to followers (excluding blocked actors).
Receive side: `handle_delete` purges inbox rows referencing the deleted
URI plus their feed entries via a new `InboxActivityRepository`. Matching
covers boost rows by `original_status_uri` and Create rows via JsonFilter
on `object.id` — both the full-URI shape and the bare-snowflake shape
Mastic's current publish pipeline emits, anchored by the activity actor.
DID args switch from `status_id` to `status_uri`; error variant becomes
`{NotFound, InvalidUri, Internal(String)}`.
Closes #19
Break the 1535-line handle_incoming.rs into a parent file holding only the dispatch + shared helpers, plus one submodule per ActivityPub verb (create, follow, like, announce, delete, undo). Tests and JSON builders move alongside the handlers they exercise; shared builders live in test_helpers.rs.
Move every per-domain `repository.rs` to `src/repository/<name>.rs` in both user and directory canisters, exposed via a top-level `crate::repository` module. Domain modules now hold only flow logic and import repositories with `use crate::repository::<name>::FooRepository;`. Drop the empty `domain::block` and `domain::tombstone` modules. Update CLAUDE.md with the new repository convention: all repos live under `crate::repository` and must implement `db_utils::repository::Repository`.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
delete_statusremoves a local status, cascades cleanup offeed/boost/likedplus the FK cascade onstatuses, and emitsDelete(Note)to followers (blocked actors skipped).handle_deletepurges inbox rows + feed entries referencing the deleted URI via a newInboxActivityRepository. Matches boost rows byoriginal_status_uriand Create rows by JsonFilter onobject.id— both full-URI and bare-snowflake shapes (anchored by activity actor).DeleteStatusArgs.status_uri, error becomes{NotFound, InvalidUri, Internal(String)}.Closes #19. Issue #20 updated to fold in the moderator-driven
moderate_delete_statuspath (separateinspectarms on directory + user, suspended-bypass for moderator path, owner-only rate limit).Test plan
just check_code(fmt + clippy -D warnings)just build_allcargo test -p user --lib(361 passing)just integration_test—tests/delete_status.rscovers owner delete + follower feed purge, idempotent receive, NotFound, InvalidUri