More accurately determine if MQTT uses the default server (#5663)

* More accurately determine if MQTT uses the default server

* Channels::anyMqttEnabled() uses same logic

* Remove previous static bool
This commit is contained in:
Eric Severance
2024-12-25 08:33:53 -06:00
committed by GitHub
co-authored by GitHub
parent fbdd6e7223
commit a7d9e8107a
3 changed files with 9 additions and 6 deletions
+1 -1
View File
@@ -318,7 +318,7 @@ bool Channels::anyMqttEnabled()
{
#if USERPREFS_EVENT_MODE
// Don't publish messages on the public MQTT broker if we are in event mode
if (strcmp(moduleConfig.mqtt.address, default_mqtt_address) == 0) {
if (mqtt && mqtt.isUsingDefaultServer()) {
return false;
}
#endif