feat: notification channels for chat, push and paging services
Channels of the new types store their settings with secrets sealed and bound to type and field, never return them, and keep them when an update leaves them empty. Messages are rendered in the channel's language with a link to the monitor. The channels page offers every service with its fields. Closes #92 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
This commit is contained in:
1 parent
a0a67ec5f8
commit
b01eefdbce
12 files changed
+1114
-134
No files matched your search
@@ -217,6 +217,13 @@ func (s *Server) send(ctx context.Context, typ string, config []byte, ev notify.
|
||||
}
|
||||
return s.smtp.Send(ctx, s.mailFor(ev, c.To, c.Locale))
|
||||
}
|
||||
if p, ok := notify.Lookup(typ); ok {
|
||||
settings, locale, err := s.openProviderSettings(typ, config)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return p.Send(ctx, settings, s.messageFor(ev, locale), !s.cloud())
|
||||
}
|
||||
return fmt.Errorf("unknown channel type %q", typ)
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user