Skip to content

Commit

Permalink
setting default routes mqtt channel to send (#50)
Browse files Browse the repository at this point in the history
Signed-off-by: mteodor <mirko.teodorovic@gmail.com>
  • Loading branch information
mteodor committed Feb 9, 2022
1 parent 7504e7f commit 0a9bbd3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/bootstrap/bootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,9 @@ func fillExportConfig(econf export.Config, c agent.Config) export.Config {
if econf.MQTT.ClientPrivKeyPath == "" {
econf.MQTT.ClientPrivKeyPath = c.MQTT.PrivKeyPath
}
for _, route := range econf.Routes {
for i, route := range econf.Routes {
if route.MqttTopic == "" {
route.MqttTopic = "channels/" + c.Channels.Data + "/messages"
econf.Routes[i].MqttTopic = "channels/" + c.Channels.Data + "/messages"
}
}
return econf
Expand Down

0 comments on commit 0a9bbd3

Please sign in to comment.