messaging: owners can block a conversation

A blocked thread key is dropped unread (not announced, not counted against
the daily new-conversation limit). API, UI button with confirmation, and a
list with unblock.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AeFqV96dVeBX94inzcgZKw
This commit is contained in:
2026-11-18 20:50:38 +01:00
co-authored by Claude Sonnet 5.5
parent a54094ea35
commit 13c82f8d59
14 changed files with 433 additions and 3 deletions
+3
View File
@@ -112,6 +112,9 @@ func New(cfg Config) http.Handler {
mux.HandleFunc("GET /api/v1/inbox/{id}/{thread}", s.admin(s.getThread))
mux.HandleFunc("POST /api/v1/inbox/{id}/{thread}", s.admin(s.reply))
mux.HandleFunc("DELETE /api/v1/inbox/{id}/{thread}", s.admin(s.deleteThread))
mux.HandleFunc("PUT /api/v1/inbox/{id}/{thread}/block", s.admin(s.blockThread))
mux.HandleFunc("DELETE /api/v1/inbox/{id}/{thread}/block", s.admin(s.unblockThread))
mux.HandleFunc("GET /api/v1/blocked", s.admin(s.listBlocked))
mux.HandleFunc("PUT /api/v1/listings/{id}/address", s.admin(s.putAddress))
mux.HandleFunc("GET /api/v1/listings/{id}/address", s.admin(s.getAddress))
mux.HandleFunc("DELETE /api/v1/listings/{id}/address", s.admin(s.deleteAddress))