mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-26 20:26:32 +00:00
fix topic comparison (#18114)
This commit is contained in:
parent
0dc39e0470
commit
0f9bece011
@ -1174,7 +1174,7 @@ bool RulesMqttData(void) {
|
|||||||
event_item = subscriptions.get(index);
|
event_item = subscriptions.get(index);
|
||||||
|
|
||||||
//AddLog(LOG_LEVEL_DEBUG, PSTR("RUL: Match MQTT message Topic %s with subscription topic %s"), sTopic.c_str(), event_item.Topic.c_str());
|
//AddLog(LOG_LEVEL_DEBUG, PSTR("RUL: Match MQTT message Topic %s with subscription topic %s"), sTopic.c_str(), event_item.Topic.c_str());
|
||||||
if (sTopic.startsWith(event_item.Topic)) {
|
if ((sTopic == event_item.Topic) || sTopic.startsWith(event_item.Topic+"/")) {
|
||||||
//This topic is subscribed by us, so serve it
|
//This topic is subscribed by us, so serve it
|
||||||
serviced = true;
|
serviced = true;
|
||||||
String value;
|
String value;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user