v0.6.9 added avatar to message list

This commit is contained in:
2026-03-10 23:18:14 -04:00
parent acc24f4d1d
commit 34d834944b
6 changed files with 18 additions and 8 deletions

View File

@@ -89,9 +89,10 @@ router.get('/', authMiddleware, (req, res) => {
}
const otherUserId = g.direct_peer1_id === userId ? g.direct_peer2_id : g.direct_peer1_id;
if (otherUserId) {
const other = db.prepare('SELECT display_name, name FROM users WHERE id = ?').get(otherUserId);
const other = db.prepare('SELECT display_name, name, avatar FROM users WHERE id = ?').get(otherUserId);
if (other) {
g.peer_real_name = other.name;
g.peer_avatar = other.avatar || null;
g.name = other.display_name || other.name;
}
}