update mqtt, implement basic chat fnc

This commit is contained in:
2018-11-19 21:20:13 +01:00
parent 4e69dbc471
commit f754e7640f

View File

@@ -45,10 +45,9 @@ void setup()
webServerPlugin->server->serveStatic(MQTT_CONFIG_FILE, SPIFFS, "mqttConfig.json");
const char* mqttChatTopic = (String(MQTT_ROOT_TOPIC) + "/out/chat/log").c_str();
sprocket->subscribe("chat/log", [](String msg) {
sprocket->subscribe("chat/log", [mqttChatTopic](String msg) {
PRINT_MSG(Serial, "CHAT", msg.c_str());
});
sprocket->subscribe("mqtt/connect", [mqttChatTopic](String msg) {
if (msg.length() > 0)
{