feat(notifications): Add Gotify (#1180)

feat(notifications): Add Gotify (resolves #513)
This commit is contained in:
MouldWarpMole 2023-10-14 12:08:12 +02:00 committed by GitHub
parent 525861074b
commit 77948d7654
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 233 additions and 6 deletions

View file

@ -130,6 +130,8 @@ func (s *service) registerSenders() {
s.senders = append(s.senders, NewTelegramSender(s.log, n))
case domain.NotificationTypePushover:
s.senders = append(s.senders, NewPushoverSender(s.log, n))
case domain.NotificationTypeGotify:
s.senders = append(s.senders, NewGotifySender(s.log, n))
}
}
}
@ -243,6 +245,8 @@ func (s *service) Test(ctx context.Context, notification domain.Notification) er
agent = NewTelegramSender(s.log, notification)
case domain.NotificationTypePushover:
agent = NewPushoverSender(s.log, notification)
case domain.NotificationTypeGotify:
agent = NewGotifySender(s.log, notification)
default:
s.log.Error().Msgf("unsupported notification type: %v", notification.Type)
return errors.New("unsupported notification type")