Skip to content

01a086a5 - Hide forum posts instead of deleting rows - #105

Merged
TaprootFreak merged 5 commits into
developfrom
01a086a5-forum-soft-delete
Sep 9, 2026
Merged

01a086a5 - Hide forum posts instead of deleting rows#105
TaprootFreak merged 5 commits into
developfrom
01a086a5-forum-soft-delete

Conversation

@TaprootFreakAI

Copy link
Copy Markdown
Collaborator

EN:
Staff can hide a forum post without removing the database row. DELETE /messages/:id stamps deleted_at and omits the note from reads; media, invoices, gifts, and relay copies stay. Deploy this API before the matching frontend. This supersedes the hard-delete approach in #101.

DE:
Moderatoren können einen Forenbeitrag ausblenden, ohne die Datenbankzeile zu löschen. DELETE /messages/:id setzt deleted_at und nimmt den Beitrag aus den Reads; Medien, Rechnungen, Geschenke und Relay-Kopien bleiben. Diese API vor dem Frontend deployen. Das ersetzt das echte Löschen in #101.

Details

markDeleted stamps deleted_at / deleted_by on the target and untagged direct replies. getById still returns the row so a profile note is not recreated. HTTP GET, photo, video, replies, and invoice treat a tagged row as 404. Lists and publish scans skip tagged rows. deleteById remains for internal cleanup only and is not used on this path.

Founder/moderator only, live role, 401/403/404/204/503. Public JSON never includes deletedAt.

Staff DELETE /messages/:id stamps deleted_at and hides the note from
reads. Rows, media, invoices, gifts, and relay copies stay.
MessageRow now requires the hide fields; the inbound create path
was the only src/ literal that did not spread unsignedNostrDefaults.
Staff hide uses markDeleted, not deleteById.
@TaprootFreakAI

Copy link
Copy Markdown
Collaborator Author

EN:
Ready after 2 review passes.
Staff hide forum posts with a deleted_at stamp instead of removing rows.

DE:
Bereit nach 2 Review-Durchläufen.
Moderatoren blenden Forenbeiträge mit deleted_at aus, statt Zeilen zu löschen.

Details

Pass 1: CONTRIBUTING now lists DELETE /messages/:id as markDeleted (soft-hide). Concurrent reply-create vs hide and worker-lease publish were recorded and not counted as hide-contract defects (POST already 404s a tagged parent; claims already filter deleted_at IS NULL).

Pass 2: 0 counted findings at 4dec8cc8. Comment sources empty (issue/reviews/inline/threads). mergeable: MERGEABLE. CI SUCCESS at this head: Typecheck, Lint, Handbook, E2E-check, Test (100% coverage), Build, E2E. No classic required checks on develop.

Do not merge the hard-delete PR #101.

@TaprootFreakAI
TaprootFreakAI marked this pull request as ready for review September 9, 2026 17:33
@TaprootFreak
TaprootFreak merged commit dfa46fb into develop Sep 9, 2026
2 checks passed
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.

2 participants