Add admin-only private chat messages and message deletion
Deploy with Docker Compose / deploy (push) Successful in 58s
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:
@@ -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"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user