Add admin-only private chat messages and message deletion
Deploy with Docker Compose / deploy (push) Successful in 58s

Admins can flag a chat message as private so only other admin
connections receive it, and can delete any message. Admin status is
read from the auth cookies on the WebSocket upgrade request.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
This commit is contained in:
2026-09-16 15:22:26 +01:00
co-authored by Claude Fable 5.1
parent ebb28532c3
commit 6037729edd
8 changed files with 209 additions and 16 deletions
+1
View File
@@ -32,6 +32,7 @@ type Message struct {
Content string `json:"text"`
AuthorID uint `json:"authorId"`
FileURL string `json:"fileUrl,omitempty"`
Private bool `gorm:"not null;default:false" json:"private"`
CreatedAt time.Time `json:"createdAt"`
DeletedAt gorm.DeletedAt `gorm:"index" json:"deletedAt"`
}