feat: persist chat messages to SQLite
Chat messages were ephemeral — lost on page refresh or late join. Add a chat_messages table and load the last 50 messages on connect so players see conversation history.
This commit is contained in:
@@ -8,6 +8,15 @@ import (
|
||||
"database/sql"
|
||||
)
|
||||
|
||||
type ChatMessage struct {
|
||||
ID int64
|
||||
GameID string
|
||||
Nickname string
|
||||
Color int64
|
||||
Message string
|
||||
CreatedAt int64
|
||||
}
|
||||
|
||||
type Game struct {
|
||||
ID string
|
||||
Board string
|
||||
|
||||
Reference in New Issue
Block a user