Skip to content

Commit 5729226

Browse files
authored
pass notification message to mqtt (#8)
1 parent ceb072e commit 5729226

File tree

1 file changed

+1
-1
lines changed
  • internal/notifier/service/mqtt

1 file changed

+1
-1
lines changed

internal/notifier/service/mqtt/mqtt.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ func NewMqttNotifier(config *config.Config) *MqttNotifier {
3636
func (m *MqttNotifier) SendNotification(c context.Context, notification *nModel.Notification) error {
3737
log := logging.FromContext(c)
3838

39-
token := m.client.Publish(m.topic, 0, false, "testing").WaitTimeout(time.Second * 4)
39+
token := m.client.Publish(m.topic, 0, false, notification.Text).WaitTimeout(time.Second * 4)
4040
if token {
4141
log.Info("Mqtt notification delivered")
4242
return nil

0 commit comments

Comments
 (0)