mirror of
https://github.com/meshtastic/firmware.git
synced 2025-09-05 02:59:11 +00:00
Always set the channel corresponding to a node
This commit is contained in:
parent
2c2213ef9b
commit
02706ab7be
@ -187,9 +187,10 @@ ErrorCode Router::sendLocal(meshtastic_MeshPacket *p, RxSource src)
|
||||
handleReceived(p, src);
|
||||
}
|
||||
|
||||
if (!p->channel && !p->pki_encrypted) { // don't override if a channel was requested
|
||||
// don't override if a channel was requested and no need to set it when PKI is enforced
|
||||
if (!p->channel && !p->pki_encrypted) {
|
||||
meshtastic_NodeInfoLite *node = nodeDB->getMeshNode(p->to);
|
||||
if (node && node->user.public_key.size == 0) {
|
||||
if (node) {
|
||||
p->channel = node->channel;
|
||||
LOG_DEBUG("localSend to channel %d", p->channel);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user