Merge branch 'master' into wismeshtap_4.5.12

This commit is contained in:
Ben Meadors 2024-11-09 05:24:16 -06:00 committed by GitHub
commit 2f2c9f521d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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);
}