mirror of
https://github.com/MeshCore-Beacon/beacon-server.git
synced 2026-10-23 03:01:41 +00:00
fix: capture node preset only on 0 hop
previously could be observed after a bridge node
This commit is contained in:
1 file changed
+5
-1
@@ -76,7 +76,11 @@ func (w *Worker) handlePayloadTypeSideEffects(ctx context.Context, packet *meshc
|
||||
Latitude: lat,
|
||||
Longitude: lon,
|
||||
}
|
||||
nodeID, err := w.db.UpsertNode(ctx, params, radio)
|
||||
var nodeRadio RadioSettings
|
||||
if packet.PathHashCount() == 0 {
|
||||
nodeRadio = radio
|
||||
}
|
||||
nodeID, err := w.db.UpsertNode(ctx, params, nodeRadio)
|
||||
if err != nil {
|
||||
log.Printf("ingest[%s]: db: upsert node failed: %v", w.cfg.BrokerName, err)
|
||||
return
|
||||
|
||||
Reference in new issue
Block a user