From a99d21c61f862dbd05b28725d6ed340e8fe79e50 Mon Sep 17 00:00:00 2001 From: eatmoreapple <15055461510@163.com> Date: Sat, 25 Dec 2021 13:07:35 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=A4=B4=E5=83=8F=E4=B8=8B?= =?UTF-8?q?=E8=BD=BD=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client.go | 2 ++ message_handle.go | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/client.go b/client.go index 8a45d6f..2e0882a 100644 --- a/client.go +++ b/client.go @@ -287,6 +287,8 @@ func (c *Client) WebWxGetHeadImg(user *User) (*http.Response, error) { params.Add("username", user.UserName) params.Add("skey", user.Self.Bot.Storage.Request.Skey) params.Add("type", "big") + params.Add("chatroomid", user.EncryChatRoomId) + params.Add("seq", "0") URL, _ := url.Parse(c.Domain.BaseHost() + webwxgeticon) URL.RawQuery = params.Encode() path = URL.String() diff --git a/message_handle.go b/message_handle.go index 1f7209c..e77ecbf 100644 --- a/message_handle.go +++ b/message_handle.go @@ -54,6 +54,14 @@ func (c *MessageContext) Abort() { c.abortIndex = c.index } +// AbortHandler 获取当前中断的消息处理函数 +func (c *MessageContext) AbortHandler() MessageContextHandler { + if c.abortIndex > 0 { + return c.messageHandlers[c.abortIndex-1] + } + return nil +} + // MatchFunc 消息匹配函数,返回为true则表示匹配 type MatchFunc func(*Message) bool