mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 08:49:13 +00:00
feat(notifications): add LunaSea support (#1284)
* feat(notifications): add lunasea * fix(web): truncate overflow in PasswordFieldWide * refactor(notifications): centralize msg building Left the building logic in discord.go and notifiarr.go as is because of their unique structure. * refactor: moved components and swapped to outline - Refactored the iconComponentMap to use a single iconStyle variable. * upped size from 4 to 5 * rename NotificationBuilder function
This commit is contained in:
parent
da365da17c
commit
a89a1a55d9
13 changed files with 266 additions and 203 deletions
|
@ -132,6 +132,8 @@ func (s *service) registerSenders() {
|
|||
s.senders = append(s.senders, NewPushoverSender(s.log, n))
|
||||
case domain.NotificationTypeGotify:
|
||||
s.senders = append(s.senders, NewGotifySender(s.log, n))
|
||||
case domain.NotificationTypeLunaSea:
|
||||
s.senders = append(s.senders, NewLunaSeaSender(s.log, n))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -247,6 +249,8 @@ func (s *service) Test(ctx context.Context, notification domain.Notification) er
|
|||
agent = NewPushoverSender(s.log, notification)
|
||||
case domain.NotificationTypeGotify:
|
||||
agent = NewGotifySender(s.log, notification)
|
||||
case domain.NotificationTypeLunaSea:
|
||||
agent = NewLunaSeaSender(s.log, notification)
|
||||
default:
|
||||
s.log.Error().Msgf("unsupported notification type: %v", notification.Type)
|
||||
return errors.New("unsupported notification type")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue