kopia lustrzana https://github.com/meshtastic/firmware
just for good measure, correct json type field
rodzic
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());
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue