Possibly forward PKC DMs over MQTT (#5012)

This commit is contained in:
Jonathan Bennett 2024-10-09 17:56:08 -05:00 committed by GitHub
parent ddd4a45bc3
commit ad8747d914
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -613,7 +613,7 @@ void Router::handleReceived(meshtastic_MeshPacket *p, RxSource src)
#if !MESHTASTIC_EXCLUDE_MQTT
// After potentially altering it, publish received message to MQTT if we're not the original transmitter of the packet
if (decoded && moduleConfig.mqtt.enabled && !isFromUs(p) && mqtt)
if ((decoded || (p->channel == 0x00 && p->to != NODENUM_BROADCAST)) && moduleConfig.mqtt.enabled && !isFromUs(p) && mqtt)
mqtt->onSend(*p_encrypted, *p, p->channel);
#endif
}