Suche: Benutzer findbar, Klick oeffnet Chat direkt

This commit is contained in:
2026-06-05 19:09:04 +02:00
parent 55af529c76
commit 8a5e8cc003
3 changed files with 27 additions and 5 deletions

View File

@@ -222,9 +222,16 @@ router.get('/', authenticate, (req, res) => {
ORDER BY created_at DESC LIMIT 5
`).all(uid, like, like));
// Andere Benutzer für Chat-Navigation (nur Benutzernamen, keine sensiblen Daten)
const users = safe(() => db.prepare(`
SELECT id, username FROM users
WHERE id != ? AND LOWER(username) LIKE ?
ORDER BY username LIMIT 5
`).all(uid, like));
res.json({ links, folders, snippets, calculations, orders, todos, notes,
board_items, changelog, files, file_folders, push_schedules,
calendar_feeds, calendar_events, qr_codes });
calendar_feeds, calendar_events, qr_codes, users });
});
// Debug-Endpoint: Kalender-Cache inspizieren