Fix variable assignment in message handler to correctly identify fromNodeId and toNodeId for neighbor information extraction.
This commit is contained in:
parent
dc9a45a62a
commit
4a4b5fb7f3
1 changed files with 2 additions and 2 deletions
|
|
@ -1096,7 +1096,7 @@ client.on("message", async (topic, message) => {
|
|||
|
||||
// Extract edges from neighbour info
|
||||
try {
|
||||
const fromNodeId = envelope.packet.from;
|
||||
const toNodeId = envelope.packet.from;
|
||||
const neighbors = neighbourInfo.neighbors || [];
|
||||
const packetId = envelope.packet.id;
|
||||
const channelId = envelope.channelId;
|
||||
|
|
@ -1115,7 +1115,7 @@ client.on("message", async (topic, message) => {
|
|||
continue;
|
||||
}
|
||||
|
||||
const toNodeId = neighbour.nodeId;
|
||||
const fromNodeId = neighbour.nodeId;
|
||||
const snr = neighbour.snr;
|
||||
|
||||
// Fetch node positions from Node table
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue