forked from esap/wechat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathusermsg.go
92 lines (81 loc) · 1.95 KB
/
usermsg.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
package wechat
import (
"encoding/xml"
)
type (
// WxMsg 混合用户消息,业务判断的主体
WxMsg struct {
XMLName xml.Name `xml:"xml"`
ToUserName string
FromUserName string
CreateTime int64
MsgId int64
MsgType string
Content string // text
AgentID int // corp
PicUrl string // image
MediaId string // image/voice/video/shortvideo
Format string // voice
Recognition string // voice
ThumbMediaId string // video
LocationX float32 `xml:"Latitude"` // location
LocationY float32 `xml:"Longitude"` // location
Precision float32 // LOCATION
Scale int // location
Label string // location
Title string // link
Description string // link
Url string // link
Event string // event
EventKey string // event
Ticket string
ScanCodeInfo struct {
ScanType string
ScanResult string
}
AgentType string
ItemCount int
PackageId string
Item []struct {
FromUserName string
CreateTime int64
MsgType string
Event string // event
Name string
Owner string
AddUserList string
DelUserList string
ChatId string
MsgId int64
ChatInfo struct {
ChatId string
Name string
Owner string
UserList string
}
Content string // text
Receiver struct {
Type string
Id string
}
FileName string // file
PicUrl string // image/link
MediaId string // image/voice/video/shortvideo
Location_X float32 // location
Location_Y float32 // location
Scale int // location
Label string // location
Title string // link
Description string // link
Url string // link
}
}
// WxMsgEnc 加密的用户消息
WxMsgEnc struct {
XMLName xml.Name `xml:"xml"`
ToUserName string
AgentID int
Encrypt string
AgentType string
}
)