Update ESPMegaIoT.cpp
This commit is contained in:
parent
810c2794f1
commit
142f0dd2e2
|
@ -45,7 +45,7 @@ void ESPMegaIoT::mqttCallback(char *topic, byte *payload, unsigned int length)
|
||||||
char *topic_without_base = topic + strlen(this->mqtt_config.base_topic) + 1;
|
char *topic_without_base = topic + strlen(this->mqtt_config.base_topic) + 1;
|
||||||
for (const auto &callback : mqtt_relative_callbacks)
|
for (const auto &callback : mqtt_relative_callbacks)
|
||||||
{
|
{
|
||||||
callback.second(topic_without_base + 3, payload_buffer);
|
callback.second(topic_without_base, payload_buffer);
|
||||||
}
|
}
|
||||||
for (const auto &callback : mqtt_callbacks)
|
for (const auto &callback : mqtt_callbacks)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue