Browse Source

fix:edit send_msg.go

jimmyyem 7 months ago
parent
commit
c275e86ace
1 changed files with 1 additions and 1 deletions
  1. 1 1
      crontask/send_msg.go

+ 1 - 1
crontask/send_msg.go

@@ -154,7 +154,7 @@ func (l *CronTask) sendMsg() {
 			// 所以增加了一个判断,判断发送的内容类型,如果是文字就调用SendTextMsg,如果是图片就调用SendPicMsg
 			if msg.Msgtype == 1 {
 				err = hookClient.SendTextMsg(msg.Toid, msg.Msg)
-			} else {
+			} else if msg.Msgtype == 2 {
 				diyfilename := getFileName(msg.Msg)
 				err = hookClient.SendPicMsg(msg.Toid, msg.Msg, diyfilename)
 			}