feat/pin-message #66
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/pin-message"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Implements the HTTP layer for Phase 19 pinned messages: - POST /messages/{id}/pin and DELETE /messages/{id}/pin write to the DB, broadcast MessagePinned/MessageUnpinned WS events, and return an OOB-swapped pinned strip fragment so the requesting tab updates immediately. - GET /room/{id}/pins and GET /dm/{peer_id}/pins render a standalone page listing all pins for the room newest-first, with per-row Unpin buttons that remove themselves from the list via hx-swap="outerHTML". - A pinned strip appears below the room/DM header, pre-rendered server-side at page load and updated live via WS broadcasts. Caps display at 3 entries with a "See all (N) pinned" link to the full list. - MessageView gains is_pinned so the hover menu shows Pin vs Unpin without an extra per-message query; page renders bulk-load pinned ids in a single query, while per-message broadcast sites set it to false (the next full page load corrects the state). - AppError::Conflict(String) maps to HTTP 409 and is returned when the per-room pin cap is exceeded.