feat: Initialize Electron application with core backend, frontend chat/login UI, and IPC for crypto and link previews.

This commit is contained in:
bryan
2025-12-31 14:26:27 -06:00
parent b26a1d0b4b
commit f531301863
7 changed files with 324 additions and 167 deletions

View File

@@ -38,7 +38,7 @@ io.on('connection', (socket) => {
// Load recent messages
try {
const result = await db.query(
`SELECT m.*, u.username
`SELECT m.*, u.username, u.public_signing_key
FROM messages m
JOIN users u ON m.sender_id = u.id
WHERE m.channel_id = $1
@@ -69,10 +69,11 @@ io.on('connection', (socket) => {
...data
};
// Get username for display
const userRes = await db.query('SELECT username FROM users WHERE id = $1', [senderId]);
// Get username and signing key for display/verification
const userRes = await db.query('SELECT username, public_signing_key FROM users WHERE id = $1', [senderId]);
if (userRes.rows.length > 0) {
message.username = userRes.rows[0].username;
message.public_signing_key = userRes.rows[0].public_signing_key;
}
// Broadcast to channel