mirror of
https://github.com/yusing/godoxy.git
synced 2026-03-17 23:03:49 +01:00
fixed notification not being sent
This commit is contained in:
@@ -19,6 +19,8 @@ func highlight(subject string) string {
|
||||
|
||||
func PrependSubject(subject string, err error) error {
|
||||
switch err := err.(type) {
|
||||
case nil:
|
||||
return nil
|
||||
case *withSubject:
|
||||
return err.Prepend(subject)
|
||||
case Error:
|
||||
|
||||
@@ -90,7 +90,7 @@ func (disp *Dispatcher) dispatch(msg *LogMessage) {
|
||||
if errs.HasError() {
|
||||
E.LogError(errs.About(), errs.Error())
|
||||
} else {
|
||||
logging.Debug().Msgf("dispatched notif: %s", msg.Message)
|
||||
logging.Debug().Str("title", msg.Title).Str("message", msg.Message).Msgf("dispatched notif")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -62,8 +62,6 @@ func (client *GotifyClient) Send(ctx context.Context, logMsg *LogMessage) error
|
||||
priority = 5
|
||||
case zerolog.FatalLevel, zerolog.PanicLevel:
|
||||
priority = 8
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
|
||||
msg := &GotifyMessage{
|
||||
|
||||
Reference in New Issue
Block a user