Skip to content

Commit

Permalink
bug-fix: Lark(Feishu) notifications don't work (megaease#170)
Browse files Browse the repository at this point in the history
  • Loading branch information
xhkyyy authored Jul 17, 2022
1 parent 8b5be29 commit 7eb4346
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion notify/lark/lark.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ func (c *NotifyConfig) SendLarkNotification(msg string) error {
}
// Server returns {"Extra":null,"StatusCode":0,"StatusMessage":"success"} on success
// otherwise it returns {"code":9499,"msg":"Bad Request","data":{}}
if ret["StatusCode"] != "0" {
if statusCode, ok := ret["StatusCode"].(float64); !ok || statusCode != 0 {
return fmt.Errorf("Error response from Lark [%d] - [%s]", int(ret["code"].(float64)), ret["msg"])
}
return nil
Expand Down
2 changes: 1 addition & 1 deletion report/result.go
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ func ToLark(r probe.Result) string {
"elements": [
{
"tag": "plain_text",
"content": %s
"content": "%s"
}
]
}
Expand Down
2 changes: 1 addition & 1 deletion report/sla.go
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ func SLALark(probers []probe.Prober) string {
"elements": [
{
"tag": "plain_text",
"content": global.Prog
"content": "` + global.FooterString() + `"
}
]
}
Expand Down

0 comments on commit 7eb4346

Please sign in to comment.