Skip to content

Commit a120f04

Browse files
author
Matrix-X
committed
refact(kernel): put event type to CallbackMessageHeader
1 parent 096473b commit a120f04

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

src/kernel/models/callback.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ type CallbackMessageHeader struct {
3333
MsgType string `xml:"MsgType"`
3434
Event string `xml:"Event"`
3535
ChangeType string `xml:"ChangeType"`
36+
EventKey string `xml:"EventKey,omitempty"`
3637
Content []byte
3738
}
3839

src/officialAccount/server/handlers/models/event.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ type EventView struct {
9696
type EventScanCodePush struct {
9797
contract.EventInterface
9898
models.CallbackMessageHeader
99-
EventKey string `xml:"EventKey"`
99+
//EventKey string `xml:"EventKey"`
100100
ScanCodeInfo struct {
101101
Text string `xml:",chardata"`
102102
ScanType string `xml:"ScanType"`
@@ -108,7 +108,7 @@ type EventScanCodePush struct {
108108
type EventScancodeWaitMsg struct {
109109
contract.EventInterface
110110
models.CallbackMessageHeader
111-
EventKey string `xml:"EventKey"`
111+
//EventKey string `xml:"EventKey"`
112112
ScanCodeInfo struct {
113113
Text string `xml:",chardata"`
114114
ScanType string `xml:"ScanType"`
@@ -120,7 +120,7 @@ type EventScancodeWaitMsg struct {
120120
type EventPicSysPhoto struct {
121121
contract.EventInterface
122122
models.CallbackMessageHeader
123-
EventKey string `xml:"EventKey"`
123+
//EventKey string `xml:"EventKey"`
124124
SendPicsInfo struct {
125125
Text string `xml:",chardata"`
126126
Count string `xml:"Count"`
@@ -138,7 +138,7 @@ type EventPicSysPhoto struct {
138138
type EventPicPhotoOrAlbum struct {
139139
contract.EventInterface
140140
models.CallbackMessageHeader
141-
EventKey string `xml:"EventKey"`
141+
//EventKey string `xml:"EventKey"`
142142
SendPicsInfo struct {
143143
Text string `xml:",chardata"`
144144
Count string `xml:"Count"`
@@ -156,7 +156,7 @@ type EventPicPhotoOrAlbum struct {
156156
type EventPicWeixin struct {
157157
contract.EventInterface
158158
models.CallbackMessageHeader
159-
EventKey string `xml:"EventKey"`
159+
//EventKey string `xml:"EventKey"`
160160
SendPicsInfo struct {
161161
Text string `xml:",chardata"`
162162
Count string `xml:"Count"`
@@ -266,7 +266,7 @@ type EventTemplateCardEvent struct {
266266
type EventTemplateCardMenuEvent struct {
267267
contract.EventInterface
268268
models.CallbackMessageHeader
269-
EventKey string `xml:"EventKey"`
269+
//EventKey string `xml:"EventKey"`
270270
TaskID string `xml:"TaskId"`
271271
CardType string `xml:"CardType"`
272272
ResponseCode string `xml:"ResponseCode"`

src/work/server/handlers/models/event.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ type EventTemplateCardEvent struct {
263263
type EventTemplateCardMenuEvent struct {
264264
contract.EventInterface
265265
models.CallbackMessageHeader
266-
EventKey string `xml:"EventKey"`
266+
//EventKey string `xml:"EventKey"`
267267
TaskID string `xml:"TaskId"`
268268
CardType string `xml:"CardType"`
269269
ResponseCode string `xml:"ResponseCode"`

0 commit comments

Comments
 (0)