web: use last-seen-recently fallback in private chat status
Some checks are pending
CI / test (push) Has started running
Some checks are pending
CI / test (push) Has started running
This commit is contained in:
@@ -9,7 +9,7 @@ Legend:
|
||||
|
||||
1. Account - `DONE` (email auth, JWT, refresh, logout, reset, sessions; web handles `/verify-email?token=...` links with auth-page feedback; integration tests cover resend-verification replacement, password-reset login flow, and `check-email` status transitions)
|
||||
2. User Profile - `DONE` (username, name, avatar, bio, update)
|
||||
3. User Status - `PARTIAL` (online/last seen/offline; web now formats `just now/today/yesterday/recently`, backend-side presence heuristics still limited)
|
||||
3. User Status - `PARTIAL` (online/last seen/offline; web now formats `just now/today/yesterday/recently` and uses Telegram-like fallback `last seen recently` when precise last-seen is unavailable; backend-side presence heuristics still limited)
|
||||
4. Contacts - `PARTIAL` (list/search/add/remove/block/unblock; `add by email` flow covered by integration tests including `success/not found/blocked conflict`; web now surfaces specific add-by-email errors (`not found` vs `blocked`); UX moved to menu; Contacts panel now includes inline `Block/Unblock` actions per user)
|
||||
5. Chat List - `DONE` (all/pinned/archive/sort/unread; saved-messages delete behavior covered: clear history without deleting chat; regression test covers `GET /chats/{saved_id}` detail response)
|
||||
6. Chat Types - `DONE` (private/group/channel)
|
||||
|
||||
@@ -645,7 +645,7 @@ export function ChatInfoPanel({ chatId, open, onClose }: Props) {
|
||||
? "User is online"
|
||||
: chat.counterpart_last_seen_at
|
||||
? `Last seen ${formatLastSeen(chat.counterpart_last_seen_at)}`
|
||||
: "User is offline"}
|
||||
: "Last seen recently"}
|
||||
</p>
|
||||
) : (
|
||||
<p className="text-sm text-slate-300">No extra information.</p>
|
||||
@@ -1304,7 +1304,7 @@ function privateChatStatusLabel(chat: { counterpart_is_online?: boolean | null;
|
||||
if (chat.counterpart_last_seen_at) {
|
||||
return `last seen ${formatLastSeen(chat.counterpart_last_seen_at)}`;
|
||||
}
|
||||
return "offline";
|
||||
return "last seen recently";
|
||||
}
|
||||
|
||||
function initialsFromName(value: string): string {
|
||||
|
||||
@@ -873,7 +873,7 @@ function chatMetaLabel(chat: {
|
||||
if (chat.counterpart_last_seen_at) {
|
||||
return `last seen ${formatLastSeen(chat.counterpart_last_seen_at)}`;
|
||||
}
|
||||
return "offline";
|
||||
return "last seen recently";
|
||||
}
|
||||
if (chat.type === "group") {
|
||||
const members = chat.members_count ?? 0;
|
||||
|
||||
@@ -301,7 +301,7 @@ function headerMetaLabel(chat: {
|
||||
if (chat.counterpart_last_seen_at) {
|
||||
return `last seen ${formatLastSeen(chat.counterpart_last_seen_at)}`;
|
||||
}
|
||||
return "offline";
|
||||
return "last seen recently";
|
||||
}
|
||||
if (chat.type === "group") {
|
||||
const members = chat.members_count ?? 0;
|
||||
|
||||
Reference in New Issue
Block a user