From 1dce492f306faeb4b6ecb386c26bae2fa0b18d18 Mon Sep 17 00:00:00 2001 From: dustoair <107600816+dustoair@users.noreply.github.com> Date: Thu, 28 Jul 2022 19:33:51 +0800 Subject: [PATCH] add text record --- handle/handleMessage.go | 1 + handle/replyText.go | 1 + 2 files changed, 2 insertions(+) diff --git a/handle/handleMessage.go b/handle/handleMessage.go index f68554c..a923bb0 100644 --- a/handle/handleMessage.go +++ b/handle/handleMessage.go @@ -29,6 +29,7 @@ func handleMessage(w http.ResponseWriter, r *http.Request) { return } else { log.Println("消息验证成功:", msgContent) + go RecordWechatLog(msgContent.FromUsername, msgContent.ToUsername, msgContent.CreateTime, msgContent.MsgType, msgContent.Content) if global.EnableReply { Reply(msgContent, timestamp, nonce, w) } else { diff --git a/handle/replyText.go b/handle/replyText.go index 9b60a34..266eb96 100644 --- a/handle/replyText.go +++ b/handle/replyText.go @@ -77,6 +77,7 @@ func replyText(msgContent MsgContent, timestamp, nonce string, w http.ResponseWr log.Println("返回消息失败") return } else { + go RecordWechatLog(msgContent.FromUsername, msgContent.ToUsername, msgContent.CreateTime, msgContent.MsgType, replyContent) log.Println("成功写入", l) } }