V0.7.0 avatar and user to user name update
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "jama-backend",
|
||||
"version": "0.6.9",
|
||||
"version": "0.7.0",
|
||||
"description": "TeamChat backend server",
|
||||
"main": "src/index.js",
|
||||
"scripts": {
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user