V0.7.0 avatar and user to user name update

This commit is contained in:
2026-03-10 23:52:42 -04:00
parent 34d834944b
commit fd041ea95a
9 changed files with 47 additions and 12 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "jama-backend",
"version": "0.6.9",
"version": "0.7.0",
"description": "TeamChat backend server",
"main": "src/index.js",
"scripts": {

View File

@@ -92,6 +92,7 @@ router.get('/', authMiddleware, (req, res) => {
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_display_name = other.display_name || null; // null if no custom display name set
g.peer_avatar = other.avatar || null;
g.name = other.display_name || other.name;
}