Added full message handling system with archive view, pagination, and send support
- Implemented message inbox and archived messages view - Added pagination logic to both inbox and archive handlers - Integrated message sending functionality with CSRF protection - Updated schema to include `archived_at` timestamp - Included archive button and logic with feedback flash messaging - Fixed message dropdown routing and rendering in topbar - Cleaned up template load paths and error handling
This commit is contained in:
@@ -115,12 +115,13 @@ const SchemaUsersMessages = `
|
||||
CREATE TABLE IF NOT EXISTS users_messages (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
senderId INTEGER NOT NULL REFERENCES users(id),
|
||||
recipientId int,
|
||||
recipientId INTEGER NOT NULL REFERENCES users(id),
|
||||
subject TEXT NOT NULL,
|
||||
message TEXT,
|
||||
is_read BOOLEAN DEFAULT FALSE,
|
||||
is_archived BOOLEAN DEFAULT FALSE,
|
||||
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
||||
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
archived_at TIMESTAMP
|
||||
);`
|
||||
|
||||
const SchemaUsersNotifications = `
|
||||
|
||||
Reference in New Issue
Block a user