mesh: persist destination (to) on captured rx history records

This commit is contained in:
2026-09-25 15:02:21 +00:00
parent b677c05681
commit 34e7bfe0bb
2 changed files with 44 additions and 5 deletions
+2 -1
View File
@@ -37,7 +37,7 @@ export interface MessageRecord {
dir: 'rx' | 'tx';
/** sender node num — rx only */
from?: number;
/** destination node num (broadcast addr for broadcasts) — tx only */
/** destination node num (broadcast addr for broadcasts) — captured rx packets and all tx records */
to?: number;
text: string;
channel: number;
@@ -626,6 +626,7 @@ export class MeshService implements OnModuleInit, OnModuleDestroy {
id: pkt.id,
dir: 'rx',
from: pkt.from,
to: pkt.to, // destination (broadcast addr for broadcasts) — lets a later reply tell DM vs broadcast apart
text,
channel: pkt.channel ?? 0,
at: Date.now(),