diff --git a/client.go b/client.go index ac3042c..302a4c2 100644 --- a/client.go +++ b/client.go @@ -383,6 +383,11 @@ func (c *Client) WebWxUploadMediaByChunk(file *os.File, request *BaseRequest, in if chunks > 1 { content["chunks"] = strconv.FormatInt(chunks, 10) } + + if _, err = file.Seek(0, 0); err != nil { + return nil, err + } + // 分块上传 for chunk := 0; int64(chunk) < chunks; chunk++ { diff --git a/doc/doc.md b/doc/doc.md index 130984e..8f19c2a 100644 --- a/doc/doc.md +++ b/doc/doc.md @@ -284,6 +284,22 @@ dispatcher.OnVoice(handlers ...MessageContextHandler) +###### 注册消息类型为`好友添加`的处理函数 + +```go +dispatcher.OnFriendAdd(handlers ...MessageContextHandler) +``` + + + +###### 注册消息类型为`Card`的处理函数 + +```go +dispatcher.OnCard(handlers ...MessageContextHandler) +``` + + + ### 登陆用户