File tree Expand file tree Collapse file tree 3 files changed +18
-0
lines changed
Expand file tree Collapse file tree 3 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,9 @@ package wechatypuppet
33import (
44 "errors"
55 "fmt"
6+
67 lru "github.com/hashicorp/golang-lru"
8+
79 "github.com/wechaty/go-wechaty/wechaty-puppet/events"
810 "github.com/wechaty/go-wechaty/wechaty-puppet/filebox"
911 "github.com/wechaty/go-wechaty/wechaty-puppet/helper"
Original file line number Diff line number Diff line change @@ -93,6 +93,18 @@ type MessagePayloadBase struct {
9393
9494 // 小程序有些消息类型,wechaty服务端解析不处理,框架端解析。 xml type 36 是小程序
9595 FixMiniApp bool
96+
97+ ReferMessage * ReferMessagePayload
98+ }
99+
100+ type ReferMessagePayload struct {
101+ Type MessageType // TODO: 确认是否和 MessageType 一致
102+ SourceMsgId string
103+ TalkerId string
104+ RoomId string
105+ DisplayName string
106+ Content string
107+ Timestamp time.Time
96108}
97109
98110type MessagePayloadRoom struct {
Original file line number Diff line number Diff line change @@ -147,6 +147,10 @@ func (m *Message) Date() time.Time {
147147 return m .payload .Timestamp
148148}
149149
150+ func (m * Message ) ReferMessage () * schemas.ReferMessagePayload {
151+ return & (* m .payload .ReferMessage ) // 不希望能被修改原数据
152+ }
153+
150154// Say reply a Text or Media File message to the sender.
151155// Support msg:
152156// string
You can’t perform that action at this time.
0 commit comments