From b0096e86c1ec5f330e12a3c1f84a17a257023018 Mon Sep 17 00:00:00 2001 From: cdle <798731886@qq.com> Date: Sun, 24 Oct 2021 17:00:37 +0800 Subject: [PATCH] update --- im/wx/init.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/im/wx/init.go b/im/wx/init.go index 2aea8bf..40c63c6 100644 --- a/im/wx/init.go +++ b/im/wx/init.go @@ -164,6 +164,9 @@ func init() { io.Copy(c.Writer, rsp.Body) } }) + core.Server.GET("/wximage", func(c *gin.Context) { + c.Writer.Write([]byte{}) + }) } var myip = "" @@ -256,6 +259,12 @@ func (sender *Sender) Reply(msgs ...interface{}) (int, error) { switch item.(type) { case string: pmsg.Msg = item.(string) + // images := []string{} + // for _, v := range regexp.MustCompile(`\[CQ:image,file=base64://([^\[\]]+)\]`).FindAllStringSubmatch(pmsg.Msg, -1) { + // images = append(images, v[1]) + // message = strings.Replace(message, fmt.Sprintf(`[CQ:image,file=base64://%s]`, v[1]), "", -1) + // } + // if case []byte: pmsg.Msg = string(item.([]byte)) case core.ImageUrl: