Add message system (inbox, read view, dropdown) and truncate helper
Implemented message retrieval and read logic in storage layer Added handlers for inbox and individual message view Integrated messages into topbar dropdown with unread badge Added truncate helper to template functions Created new templates: messages/index.html and messages/read.html Fixed missing template function error in topbar rendering
This commit is contained in:
@@ -23,12 +23,13 @@ type Notification struct {
|
||||
}
|
||||
|
||||
type Message struct {
|
||||
ID int
|
||||
Sender string
|
||||
Subject string
|
||||
Message string
|
||||
IsRead bool
|
||||
CreatedAt time.Time
|
||||
ID int
|
||||
SenderId int
|
||||
RecipientId int
|
||||
Subject string
|
||||
Message string
|
||||
IsRead bool
|
||||
CreatedAt time.Time
|
||||
}
|
||||
|
||||
var db *sql.DB
|
||||
|
||||
Reference in New Issue
Block a user