|
@@ -4,6 +4,7 @@ import (
|
|
|
"context"
|
|
|
"encoding/json"
|
|
|
"fmt"
|
|
|
+ "github.com/zeromicro/go-zero/core/logx"
|
|
|
"regexp"
|
|
|
"strconv"
|
|
|
"strings"
|
|
@@ -149,9 +150,12 @@ func (l *CronTask) sendWx() {
|
|
|
l.svcCtx.Rds.Set(l.ctx, fmt.Sprintf("MsgId_FriendId:%d", msgId), v.ContactWxid, 10*time.Minute)
|
|
|
err = hookClient.SendTextMsg(v.ContactWxid, content, v.BotWxid, msgId)
|
|
|
} else {
|
|
|
+ content := v.Content
|
|
|
re := regexp.MustCompile(`[^/]+$`)
|
|
|
- fileName := re.FindString(v.Content)
|
|
|
- err = hookClient.SendPicMsg(v.ContactWxid, v.Content, fileName, v.BotWxid)
|
|
|
+ fileName := re.FindString(content)
|
|
|
+ logx.Info("SendPicMsg content: ", content)
|
|
|
+ logx.Info("SendPicMsg fileName: ", fileName)
|
|
|
+ err = hookClient.SendPicMsg(v.ContactWxid, content, fileName, v.BotWxid)
|
|
|
}
|
|
|
|
|
|
if err != nil {
|