Dateien nach "backend/src/tools/nachrichten" hochladen

This commit is contained in:
2026-05-28 00:44:30 +02:00
parent 4bec52ee55
commit d69613259c

View File

@@ -69,7 +69,8 @@ router.get('/messages/:userId', authenticate, (req, res) => {
const msgs = db.prepare(` const msgs = db.prepare(`
SELECT id, sender_id, encrypted_content, iv, created_at, SELECT id, sender_id, encrypted_content, iv, created_at,
(sender_id = ?) AS is_mine (sender_id = ?) AS is_mine,
read_by_recipient
FROM messages FROM messages
WHERE (sender_id = ? AND recipient_id = ?) WHERE (sender_id = ? AND recipient_id = ?)
OR (recipient_id = ? AND sender_id = ?) OR (recipient_id = ? AND sender_id = ?)