mirror of
https://github.com/meshtastic/firmware.git
synced 2025-02-02 10:50:40 +00:00
just for good measure, correct json type field
This commit is contained in:
parent
7c3dc076d2
commit
c97831963b
@ -42,6 +42,7 @@ void MQTT::onPublish(char *topic, byte *payload, unsigned int length)
|
||||
if (json.object_items().count("sender") != 0 && json.object_items().count("payload") != 0 && json["type"] == "sendtext") {
|
||||
// this is a valid envelope
|
||||
if (json["sender"].string_value().compare(owner.id) != 0) {
|
||||
json["type"] = "text";
|
||||
std::string jsonPayloadStr = json["payload"].dump();
|
||||
DEBUG_MSG("JSON payload %s, length %u\n", jsonPayloadStr.c_str(), jsonPayloadStr.length());
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user