1
0
mirror of https://github.com/silenceper/wechat.git synced 2026-02-04 12:52:27 +08:00

Feature: improve code message subscribe (#739)

* fix

* feat(miniapp): 小程序订阅消息 (#429)

1. 用户订阅消息服务端回调处理
2. 用户订阅消息订阅通知事件推送

Co-authored-by: houseme <qzg40737@163.com>

* feat: improve subscribe msg

* feat: add v1.21 and feature branch

* feat: improve code for subscribe

* test

* test

* fix

* fix

* improve comment

* improve code for message

* improve code for unmarshal message

* improve code for message

---------

Co-authored-by: Ralph Maas <stuchilde@outlook.com>
This commit is contained in:
houseme
2023-11-02 09:39:10 +08:00
committed by GitHub
parent d4fd145bb5
commit 56a3734546
8 changed files with 292 additions and 73 deletions

View File

@@ -28,7 +28,7 @@ type MediaText struct {
Content string `json:"content"`
}
// MediaResource 消息使用的临时素材id
// MediaResource 消息使用的临时素材 id
type MediaResource struct {
MediaID string `json:"media_id"`
}
@@ -51,7 +51,7 @@ type MediaLink struct {
// CustomerMessage 客服消息
type CustomerMessage struct {
ToUser string `json:"touser"` // 接受者OpenID
ToUser string `json:"touser"` // 接受者 OpenID
Msgtype MsgType `json:"msgtype"` // 客服消息类型
Text *MediaText `json:"text,omitempty"` // 可选
Image *MediaResource `json:"image,omitempty"` // 可选