mirror of
https://github.com/fankes/beszel.git
synced 2025-10-20 02:09:28 +08:00
Handle title and link for Lark notifications
This commit is contained in:
@@ -66,6 +66,7 @@ var supportsTitle = map[string]struct{}{
|
|||||||
"gotify": {},
|
"gotify": {},
|
||||||
"ifttt": {},
|
"ifttt": {},
|
||||||
"join": {},
|
"join": {},
|
||||||
|
"lark": {},
|
||||||
"matrix": {},
|
"matrix": {},
|
||||||
"ntfy": {},
|
"ntfy": {},
|
||||||
"opsgenie": {},
|
"opsgenie": {},
|
||||||
@@ -168,6 +169,9 @@ func (am *AlertManager) SendShoutrrrAlert(notificationUrl, title, message, link,
|
|||||||
if scheme == "ntfy" {
|
if scheme == "ntfy" {
|
||||||
// if ntfy, add link to actions
|
// if ntfy, add link to actions
|
||||||
queryParams.Add("Actions", fmt.Sprintf("view, %s, %s", linkText, link))
|
queryParams.Add("Actions", fmt.Sprintf("view, %s, %s", linkText, link))
|
||||||
|
} else if scheme == "lark" {
|
||||||
|
// if lark, add link query param
|
||||||
|
queryParams.Add("link", link)
|
||||||
} else {
|
} else {
|
||||||
// else add link directly to the message
|
// else add link directly to the message
|
||||||
message += "\n\n" + link
|
message += "\n\n" + link
|
||||||
|
Reference in New Issue
Block a user