From cd16e8247e78e9581efbcaae5158f3e334aab4db Mon Sep 17 00:00:00 2001 From: Ashing Zheng Date: Wed, 1 Mar 2023 11:31:21 +0800 Subject: [PATCH] fix: wecom need send text (#19) Signed-off-by: ashing --- server/push.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/server/push.go b/server/push.go index 4d77e87..193c884 100644 --- a/server/push.go +++ b/server/push.go @@ -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