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

@@ -7,7 +7,7 @@ TZ=UTC
# Copy this file to .env and customize
# Image version to run (set by build.sh, or use 'latest')
JAMA_VERSION=0.6.8
JAMA_VERSION=0.6.9
# Default admin credentials (used on FIRST RUN only)
ADMIN_NAME=Admin User

View File

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

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;
}
}

View File

@@ -13,7 +13,7 @@
# ─────────────────────────────────────────────────────────────
set -euo pipefail
VERSION="${1:-0.6.8}"
VERSION="${1:-0.6.9}"
ACTION="${2:-}"
REGISTRY="${REGISTRY:-}"
IMAGE_NAME="jama"

View File

@@ -1,6 +1,6 @@
{
"name": "jama-frontend",
"version": "0.6.8",
"version": "0.6.9",
"private": true,
"scripts": {
"dev": "vite",

View File

@@ -96,9 +96,18 @@ export default function Sidebar({ groups, activeGroupId, onSelectGroup, notifica
return (
<div className={`group-item ${isActive ? 'active' : ''} ${hasUnread ? 'has-unread' : ''}`} onClick={() => onSelectGroup(group.id)}>
<div className="group-icon" style={{ background: group.type === 'public' ? '#1a73e8' : '#a142f4' }}>
{group.type === 'public' ? '#' : group.name[0]?.toUpperCase()}
</div>
{group.is_direct && group.peer_avatar ? (
<img
src={group.peer_avatar}
alt={group.name}
className="group-icon"
style={{ objectFit: 'cover', padding: 0 }}
/>
) : (
<div className="group-icon" style={{ background: group.type === 'public' ? '#1a73e8' : '#a142f4' }}>
{group.type === 'public' ? '#' : group.is_direct ? (group.peer_real_name || group.name)[0]?.toUpperCase() : group.name[0]?.toUpperCase()}
</div>
)}
<div className="group-info flex-1 overflow-hidden">
<div className="flex items-center justify-between">
<span className={`group-name truncate ${hasUnread ? 'unread-name' : ''}`}>{group.is_direct && group.peer_real_name ? group.peer_real_name : group.name}</span>