Use user preferences root topic if present

This commit is contained in:
ford-jones
2025-09-30 18:04:42 +13:00
parent 02efef3aaf
commit ee8fa9f328

View File

@@ -776,7 +776,11 @@ void AdminModule::handleSetConfig(const meshtastic_Config &c)
initRegion(); initRegion();
// subscribe to appropriate MQTT root topic for this region // subscribe to appropriate MQTT root topic for this region
#ifdef USERPREFS_MQTT_ROOT_TOPIC
sprintf(moduleConfig.mqtt.root, "%s/%s", USERPREFS_MQTT_ROOT_TOPIC, myRegion->name);
#else
sprintf(moduleConfig.mqtt.root, "%s/%s", default_mqtt_root, myRegion->name); sprintf(moduleConfig.mqtt.root, "%s/%s", default_mqtt_root, myRegion->name);
#endif
changes = SEGMENT_CONFIG | SEGMENT_MODULECONFIG; changes = SEGMENT_CONFIG | SEGMENT_MODULECONFIG;
} }
break; break;