Closed bananenfisch closed 2 years ago
Hello,
thanks for the MQTT support - it's great!
For some reason (i didn't figure out why), the 2nd optional parameter do not work:
sendMQTTMessages("tcp://broker:port", [{"topic": "light/power", "payload": "toggle"}]); // connecting works, but no message published (broker without user/pwd)
sendMQTTMessages("tcp://broker:port", null, [{"topic": "light/power", "payload": "toggle"}]); // works!
And there is a typo in the mqtt-snippet: "{\"topic\": \"\", \"payload\": \"\"},\n]};\n", Should be: "{\"topic\": \"\", \"payload\": \"\"},\n]);\n", https://github.com/Waboodoo/HTTP-Shortcuts/blob/a3f95e4e070a068a54c12a6e440c8c2baf471a3e/HTTPShortcuts/app/src/main/kotlin/ch/rmy/android/http_shortcuts/activities/editor/scripting/codesnippets/usecases/GenerateCodeSnippetItemsUseCase.kt#L425
"{\"topic\": \"\", \"payload\": \"\"},\n]};\n",
"{\"topic\": \"\", \"payload\": \"\"},\n]);\n",
Thanks! Markus
Thanks for the bug report. I fixed the issue and the typo now. It will be included in the next release.
Hello,
thanks for the MQTT support - it's great!
For some reason (i didn't figure out why), the 2nd optional parameter do not work:
sendMQTTMessages("tcp://broker:port", [{"topic": "light/power", "payload": "toggle"}]); // connecting works, but no message published (broker without user/pwd)
sendMQTTMessages("tcp://broker:port", null, [{"topic": "light/power", "payload": "toggle"}]); // works!
And there is a typo in the mqtt-snippet:
"{\"topic\": \"\", \"payload\": \"\"},\n]};\n",
Should be:"{\"topic\": \"\", \"payload\": \"\"},\n]);\n",
https://github.com/Waboodoo/HTTP-Shortcuts/blob/a3f95e4e070a068a54c12a6e440c8c2baf471a3e/HTTPShortcuts/app/src/main/kotlin/ch/rmy/android/http_shortcuts/activities/editor/scripting/codesnippets/usecases/GenerateCodeSnippetItemsUseCase.kt#L425Thanks! Markus