Add the ability to delete a message (#53)

Message.deleted_at has existed since the initial schema but was never
wired up -- no WS envelope, no permission check, no frontend concept of
it at all. Soft delete, author-only (mirrors the existing edit
permission exactly): content and any attached image/file are cleared
and the underlying MessageImage/MessageFile row and stored file are
actually removed, not just detached, so the message becomes a "This
message was deleted" tombstone with nothing left to recover through a
stale attachment URL. A deleted message can no longer be edited or
reacted to.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
ksmithandClaude Sonnet 5 committed 2026-08-28 16:35:00 -06:00
1 parent 157f1e30ac
commit ef615e1ef4
13 files changed
+477 -8

No files matched your search

+19
View File
@@ -304,6 +304,25 @@
border-color: var(--ds-accent);
}
.message-delete-link {
background: var(--ds-surface-2);
border: 1px solid var(--ds-border);
color: var(--ds-muted);
font-size: 0.68rem;
cursor: pointer;
padding: 2px 8px;
border-radius: 6px;
}
.message-delete-link:hover {
color: var(--ds-danger);
border-color: var(--ds-danger);
}
.message-deleted-text {
color: var(--ds-muted);
}
.message-reaction-wrap {
position: relative;
}