Skip to content

Allow founders and moderators to delete forum posts - #101

Open
engel120-hub wants to merge 1 commit into
developfrom
codex/moderator-delete-posts
Open

Allow founders and moderators to delete forum posts#101
engel120-hub wants to merge 1 commit into
developfrom
codex/moderator-delete-posts

Conversation

@engel120-hub

@engel120-hub engel120-hub commented Sep 8, 2026

Copy link
Copy Markdown

Add DELETE /messages/:id for authenticated founder and moderator accounts, checking the live role on every request. Other roles receive 403 even for their own posts. Invalid/missing ids return 404; successful deletion returns an empty 204.

Reuse existing message-store cleanup for the post, direct replies and stored media. Gift records remain unchanged. Durable deletions retain the existing db_change trigger trail, and structured logs identify the acting account. Copies already published on external Nostr relays are outside this local removal.

Validation: typecheck, lint, handbook/E2E gates, 1,399 unit tests with 100% coverage, Bun build and all 277 HTTP E2E tests pass locally and in CI (run 34227771348). Includes role denial, demotion, deletion visibility, storage failure and missing-id tests.

Frontend: 21gifts/app#143. Deploy this API change before enabling the frontend control.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant