Allow MQTT topic to have wildcards

This should fix https://github.com/louislam/uptime-kuma/issues/1669
This commit is contained in:
Eric Duminil 2024-11-29 22:39:57 +01:00
parent c0fe669cd8
commit 558195ae6a

View file

@ -101,11 +101,9 @@ class MqttMonitorType extends MonitorType {
});
client.on("message", (messageTopic, message) => {
if (messageTopic === topic) {
client.end();
clearTimeout(timeoutID);
resolve(message.toString("utf8"));
}
client.end();
clearTimeout(timeoutID);
resolve(message.toString("utf8"));
});
});