Skip to content

Commit

Permalink
Shows commands on subfolders as well as the default topic (#1467)
Browse files Browse the repository at this point in the history
  • Loading branch information
gguuss authored Sep 9, 2019
1 parent eefa430 commit ff0bcfe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion iot/mqtt_example/cloudiot_mqtt_example_nodejs.js
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ function mqttDeviceDemo(
let messageStr = 'Message received: ';
if (topic === `/devices/${deviceId}/config`) {
messageStr = 'Config message received: ';
} else if (topic === `/devices/${deviceId}/commands`) {
} else if (topic.startsWith(`/devices/${deviceId}/commands`)) {
messageStr = 'Command message received: ';
}

Expand Down

0 comments on commit ff0bcfe

Please sign in to comment.