Drop received packets from self

This commit is contained in:
Ben Meadors 2024-09-20 06:55:16 -05:00
parent 0f3450ad44
commit 921d92c649

View File

@ -158,6 +158,11 @@ void MQTT::onReceive(char *topic, byte *payload, size_t length)
meshtastic_MeshPacket *p = packetPool.allocCopy(*e.packet);
p->via_mqtt = true; // Mark that the packet was received via MQTT
if (p->from == 0 || p->from == nodeDB->getNodeNum()) {
LOG_INFO("Ignoring downlink message we originally sent.\n");
packetPool.release(p);
return;
}
if (p->which_payload_variant == meshtastic_MeshPacket_decoded_tag) {
p->channel = ch.index;
}