From 7563d0f01869c66cb76c0e6c4f007aa46c45e722 Mon Sep 17 00:00:00 2001 From: ajvpot <553597+ajvpot@users.noreply.github.com> Date: Mon, 28 Jul 2025 00:00:00 +0000 Subject: [PATCH] add origin path info --- src/components/ChatMessageItem.tsx | 31 ++++++++++++++++++------------ src/lib/clickhouse/actions.ts | 5 +++-- 2 files changed, 22 insertions(+), 14 deletions(-) diff --git a/src/components/ChatMessageItem.tsx b/src/components/ChatMessageItem.tsx index 81b4422..457583a 100644 --- a/src/components/ChatMessageItem.tsx +++ b/src/components/ChatMessageItem.tsx @@ -7,12 +7,12 @@ export interface ChatMessage { ingest_timestamp: string; origins: string[]; mesh_timestamp: string; - packet: string; path_len: number; - path: string; channel_hash: string; mac: string; encrypted_message: string; + message_count: number; + origin_path_array: Array<[string, string]>; // Array of [origin, path] tuples } function formatHex(hex: string): string { @@ -64,14 +64,14 @@ export default function ChatMessageItem({ msg, showErrorRow }: { msg: ChatMessag return () => { cancelled = true; }; }, [msg.encrypted_message, msg.mac, msg.channel_hash, knownKeys.join(",")]); - const origins = msg.origins && msg.origins.length > 0 ? msg.origins : []; - const originsCount = origins.length; + const originPathArray = msg.origin_path_array && msg.origin_path_array.length > 0 ? msg.origin_path_array : []; + const originsCount = originPathArray.length; const OriginsBox = () => ( -