mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-02-22 11:35:56 +00:00
Allow MQTT topic to have wildcards
This should fix https://github.com/louislam/uptime-kuma/issues/1669
This commit is contained in:
parent
c0fe669cd8
commit
558195ae6a
1 changed files with 3 additions and 5 deletions
|
@ -101,11 +101,9 @@ class MqttMonitorType extends MonitorType {
|
||||||
});
|
});
|
||||||
|
|
||||||
client.on("message", (messageTopic, message) => {
|
client.on("message", (messageTopic, message) => {
|
||||||
if (messageTopic === topic) {
|
|
||||||
client.end();
|
client.end();
|
||||||
clearTimeout(timeoutID);
|
clearTimeout(timeoutID);
|
||||||
resolve(message.toString("utf8"));
|
resolve(message.toString("utf8"));
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Reference in a new issue