Merge branch 'master' into esp32-c6

This commit is contained in:
Thomas Göttgens
2024-09-27 22:51:29 +02:00
committed by GitHub
31 changed files with 109 additions and 64 deletions

View File

@@ -184,8 +184,8 @@ void MQTT::onReceive(char *topic, byte *payload, size_t length)
// PKI messages get accepted even if we can't decrypt
if (router && p->which_payload_variant == meshtastic_MeshPacket_encrypted_tag &&
strcmp(e.channel_id, "PKI") == 0) {
meshtastic_NodeInfoLite *tx = nodeDB->getMeshNode(getFrom(p));
meshtastic_NodeInfoLite *rx = nodeDB->getMeshNode(p->to);
const meshtastic_NodeInfoLite *tx = nodeDB->getMeshNode(getFrom(p));
const meshtastic_NodeInfoLite *rx = nodeDB->getMeshNode(p->to);
// Only accept PKI messages to us, or if we have both the sender and receiver in our nodeDB, as then it's
// likely they discovered each other via a channel we have downlink enabled for
if (p->to == nodeDB->getNodeNum() || (tx && tx->has_user && rx && rx->has_user))