mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-11 10:25:52 +02:00
feat: add Lark and Lark Custom notification support
This commit is contained in:
parent
e364353cd1
commit
7a0972495f
17 changed files with 174 additions and 38 deletions
|
@ -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))
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue