fix topic comparison (#18114)

This commit is contained in:
Barbudor 2023-03-05 07:52:30 +01:00 committed by GitHub
parent 0dc39e0470
commit 0f9bece011
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -1174,7 +1174,7 @@ bool RulesMqttData(void) {
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());
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
serviced = true;
String value;