v0.7.8 message list order bug fix

This commit is contained in:
2026-03-11 19:59:58 -04:00
parent 67bea6c2c3
commit 5697e3a59c
5 changed files with 8 additions and 9 deletions

View File

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

View File

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

View File

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

View File

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

View File

@@ -82,16 +82,15 @@ export default function Sidebar({ groups, activeGroupId, onSelectGroup, notifica
]; ];
const publicFiltered = allGroups.filter(g => g.type === 'public'); const publicFiltered = allGroups.filter(g => g.type === 'public');
const dms = allGroups // All private groups (DMs + group chats) sorted together by most recent message
.filter(g => g.type === 'private' && !!g.is_direct) const privateFiltered = allGroups
.filter(g => g.type === 'private')
.sort((a, b) => { .sort((a, b) => {
if (!a.last_message_at && !b.last_message_at) return 0; if (!a.last_message_at && !b.last_message_at) return 0;
if (!a.last_message_at) return 1; if (!a.last_message_at) return 1;
if (!b.last_message_at) return -1; if (!b.last_message_at) return -1;
return new Date(b.last_message_at) - new Date(a.last_message_at); return new Date(b.last_message_at) - new Date(a.last_message_at);
}); });
const privateNonDM = allGroups.filter(g => g.type === 'private' && !g.is_direct);
const privateFiltered = [...privateNonDM, ...dms];
const getNotifCount = (groupId) => notifications.filter(n => n.groupId === groupId).length; const getNotifCount = (groupId) => notifications.filter(n => n.groupId === groupId).length;
@@ -176,7 +175,7 @@ export default function Sidebar({ groups, activeGroupId, onSelectGroup, notifica
)} )}
{privateFiltered.length > 0 && ( {privateFiltered.length > 0 && (
<div className="group-section"> <div className="group-section">
<div className="section-label">DIRECT MESSAGES</div> <div className="section-label">MESSAGES</div>
{privateFiltered.map(g => <GroupItem key={g.id} group={g} />)} {privateFiltered.map(g => <GroupItem key={g.id} group={g} />)}
</div> </div>
)} )}