Skip to content

Commit 7a72874

Browse files
committed
polish:优化名片和小程序消息数据结构
1 parent 3cf92b6 commit 7a72874

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

syncmsg/message.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ type Location struct {
7070

7171
// Link 链接消息
7272
type Link struct {
73+
BaseMessage
7374
MsgType string `json:"msgtype"` // 消息类型,此时固定为:link
7475
Link struct{
7576
Title string `json:"title"` // 标题
@@ -81,6 +82,7 @@ type Link struct {
8182

8283
// BusinessCard 名片消息
8384
type BusinessCard struct {
85+
BaseMessage
8486
MsgType string `json:"msgtype"` // 消息类型,此时固定为:business_card
8587
BusinessCard struct{
8688
UserID string `json:"userid"` // 名片 userid
@@ -89,6 +91,7 @@ type BusinessCard struct {
8991

9092
// MiniProgram 小程序消息
9193
type MiniProgram struct {
94+
BaseMessage
9295
MsgType string `json:"msgtype"` // 消息类型,此时固定为:miniprogram
9396
MiniProgram struct{
9497
AppID string `json:"appid"` // 小程序appid,必须是关联到企业的小程序应用

0 commit comments

Comments
 (0)