There was an error while loading. Please reload this page.
1 parent eefa430 commit ff0bcfeCopy full SHA for ff0bcfe
iot/mqtt_example/cloudiot_mqtt_example_nodejs.js
@@ -458,7 +458,7 @@ function mqttDeviceDemo(
458
let messageStr = 'Message received: ';
459
if (topic === `/devices/${deviceId}/config`) {
460
messageStr = 'Config message received: ';
461
- } else if (topic === `/devices/${deviceId}/commands`) {
+ } else if (topic.startsWith(`/devices/${deviceId}/commands`)) {
462
messageStr = 'Command message received: ';
463
}
464
0 commit comments