Skip to content

Commit

Permalink
fix: mqtt topic in modul WebApi_mqtt
Browse files Browse the repository at this point in the history
  • Loading branch information
skippermeister committed Jul 28, 2024
1 parent 3f3dc5a commit f7fc22d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/WebApi_mqtt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -327,9 +327,9 @@ void WebApiMqttClass::onMqttAdminPost(AsyncWebServerRequest* request)

MqttSettings.setVerboseLogging(root["verbose_logging"].as<bool>());
// Check if base topic was changed
if (strcmp(cMqtt.Topic, root["mqtt_topic"].as<String>().c_str())) {
if (strcmp(cMqtt.Topic, root["topic"].as<String>().c_str())) {
MqttHandleInverter.unsubscribeTopics();
strlcpy(cMqtt.Topic, root["mqtt_topic"].as<String>().c_str(), sizeof(cMqtt.Topic));
strlcpy(cMqtt.Topic, root["topic"].as<String>().c_str(), sizeof(cMqtt.Topic));
MqttHandleInverter.subscribeTopics();
}

Expand Down

0 comments on commit f7fc22d

Please sign in to comment.