Better MQTT filtering.
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Fabian Schlenz 2019-09-25 18:13:56 +02:00
parent b0c1bcaa65
commit 937850c90a

View File

@ -23,7 +23,7 @@ void mqtt_callback(char* original_topic, byte* pl, unsigned int length) {
pl[length] = '\0';
String payload((char*)pl);
String topic (original_topic);
if (topic.compareTo(MQTT_TOPIC "log")==0 || topic.compareTo(MQTT_TOPIC "status") || topic.compareTo(MQTT_TOPIC "metrics")) {
if (topic.equals(MQTT_TOPIC "log") || topic.equals(MQTT_TOPIC "status") || topic.equals(MQTT_TOPIC "metrics")) {
// Return our own messages
return;
}