mirror of
https://github.com/Kpa-clawbot/meshcore-analyzer.git
synced 2026-08-14 08:29:46 +00:00
fix: pass observer name (msg.origin) to packet insert and observer upsert
Lincomatic MQTT packets include origin field with friendly name but we were only using it in status handler. Now both packet and observer records get the name.
This commit is contained in:
@@ -472,6 +472,7 @@ for (const source of mqttSources) {
|
||||
raw_hex: msg.raw,
|
||||
timestamp: now,
|
||||
observer_id: observerId,
|
||||
observer_name: msg.origin || null,
|
||||
snr: msg.SNR ?? null,
|
||||
rssi: msg.RSSI ?? null,
|
||||
hash: computeContentHash(msg.raw),
|
||||
@@ -505,7 +506,7 @@ for (const source of mqttSources) {
|
||||
}
|
||||
|
||||
if (observerId) {
|
||||
db.upsertObserver({ id: observerId, iata: region });
|
||||
db.upsertObserver({ id: observerId, name: msg.origin || null, iata: region });
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user