refactor: normalize inbound context
This commit is contained in:
@@ -110,7 +110,9 @@ const formatAge = (ms: number | null | undefined) => {
|
||||
function classifyKey(key: string, entry?: SessionEntry): SessionRow["kind"] {
|
||||
if (key === "global") return "global";
|
||||
if (key === "unknown") return "unknown";
|
||||
if (entry?.chatType === "group" || entry?.chatType === "room") return "group";
|
||||
if (entry?.chatType === "group" || entry?.chatType === "channel" || entry?.chatType === "room") {
|
||||
return "group";
|
||||
}
|
||||
if (key.startsWith("group:") || key.includes(":group:") || key.includes(":channel:")) {
|
||||
return "group";
|
||||
}
|
||||
|
||||
@@ -19,7 +19,9 @@ import type { HeartbeatStatus, SessionStatus, StatusSummary } from "./status.typ
|
||||
const classifyKey = (key: string, entry?: SessionEntry): SessionStatus["kind"] => {
|
||||
if (key === "global") return "global";
|
||||
if (key === "unknown") return "unknown";
|
||||
if (entry?.chatType === "group" || entry?.chatType === "room") return "group";
|
||||
if (entry?.chatType === "group" || entry?.chatType === "channel" || entry?.chatType === "room") {
|
||||
return "group";
|
||||
}
|
||||
if (key.startsWith("group:") || key.includes(":group:") || key.includes(":channel:")) {
|
||||
return "group";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user