Skip to content

Commit

Permalink
fix: wecom need send text (#19)
Browse files Browse the repository at this point in the history
Signed-off-by: ashing <[email protected]>
  • Loading branch information
ronething committed Mar 1, 2023
1 parent 6584192 commit cd16e82
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions server/push.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,13 @@ func (n *NewsPush) Push() {
}
content := strings.Join(contents, "")
for i := 0; i < len(n.Notifys); i++ {
if n.Notifys[i].String() == "wecom" { // send text
w := n.Notifys[i].(*msgpush.WeCom)
if err = w.SendText(content); err != nil {
log.Printf("wecom 推送失败, err: %v\n", err)
}
continue
}
if err = n.Notifys[i].Send(content); err != nil {
log.Printf("%s 推送发生错误, err: %v\n", n.Notifys[i].String(), err)
continue
Expand Down

0 comments on commit cd16e82

Please sign in to comment.