Skip to content

Commit

Permalink
Merge pull request #3298 from cymplecy/mqttExtensionBugfix
Browse files Browse the repository at this point in the history
Update mqttExtension.js
  • Loading branch information
jmoenig authored Jan 22, 2024
2 parents 4657366 + 94c7cd9 commit c2fb6f7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libraries/mqttExtension.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
* V1.5.4 15Feb22 When returning text to Snap!, restore explicitly making payload into a string. Also restore cymplecy.uk instead of simplesi.cloud
* V1.6.0 13Oct2023 If binary options selected then pub expects payload to be a flat List (values 0-255) and sub will return a List
* V1.6.1 05Jan2024 "binary" replaced by "buffer mode"
* V1.6.2 17Jan2023 bugfix -remove automatic convert JSON to Snap! list
*/


Expand Down Expand Up @@ -179,13 +180,15 @@ SnapExtensions.primitives.set(
newPayload = new List(payload);
} else {
newPayload = payload.toString();
/*
try {
payloadObject = JSON.parse(newPayload);
//console.log(payloadObject);
//newPayload = new List([new List([0,1,2,3]),new List([9,9,9,9])]);
newPayload = arrayToList(payloadObject);
//console.log(newPayload);
} catch (e) {console.log(e)}
*/
}

try {
Expand Down

0 comments on commit c2fb6f7

Please sign in to comment.