Better MQTT filtering.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
b0c1bcaa65
commit
937850c90a
@ -23,7 +23,7 @@ void mqtt_callback(char* original_topic, byte* pl, unsigned int length) {
|
|||||||
pl[length] = '\0';
|
pl[length] = '\0';
|
||||||
String payload((char*)pl);
|
String payload((char*)pl);
|
||||||
String topic (original_topic);
|
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 our own messages
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user