feat: Initialize Electron application with core backend, frontend chat/login UI, and IPC for crypto and link previews.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user