feat: add Lark and Lark Custom notification support

This commit is contained in:
Jacky 2025-04-09 13:13:41 +00:00
parent e364353cd1
commit 7a0972495f
No known key found for this signature in database
GPG key ID: 215C21B10DF38B4D
17 changed files with 174 additions and 38 deletions

View file

@ -4,7 +4,6 @@ import (
"context"
"github.com/0xJacky/Nginx-UI/model"
"github.com/nikoksr/notify"
"github.com/nikoksr/notify/service/dingding"
"github.com/uozi-tech/cosy/map2struct"
)
@ -31,9 +30,6 @@ func init() {
Token: dingTalkConfig.AccessToken,
Secret: dingTalkConfig.Secret,
})
// Use the service
externalNotify := notify.New()
externalNotify.UseServices(dingTalkService)
return externalNotify.Send(ctx, msg.GetTitle(n.Language), msg.GetContent(n.Language))
return dingTalkService.Send(ctx, msg.GetTitle(n.Language), msg.GetContent(n.Language))
})
}