Skip to content

Commit 1e8be14

Browse files
committed
In case of Azure the command is not always in the suffix.
1 parent 71b098c commit 1e8be14

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

internal/integration/mqtt/backend.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -335,10 +335,10 @@ func (b *Backend) handleGatewayConfiguration(c paho.Client, msg paho.Message) {
335335
}
336336

337337
func (b *Backend) handleCommand(c paho.Client, msg paho.Message) {
338-
if strings.HasSuffix(msg.Topic(), "down") {
338+
if strings.HasSuffix(msg.Topic(), "down") || strings.Contains(msg.Topic(), "command=down") {
339339
mqttCommandCounter("down")
340340
b.handleDownlinkFrame(c, msg)
341-
} else if strings.HasSuffix(msg.Topic(), "config") {
341+
} else if strings.HasSuffix(msg.Topic(), "config") || strings.Contains(msg.Topic(), "command=config") {
342342
mqttCommandCounter("config")
343343
b.handleGatewayConfiguration(c, msg)
344344
} else {

0 commit comments

Comments
 (0)