添加头像下载参数

This commit is contained in:
eatmoreapple 2021-12-25 13:07:35 +08:00
parent d42b58328c
commit a99d21c61f
2 changed files with 10 additions and 0 deletions

View File

@ -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()

View File

@ -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