mirror of
https://github.com/retailcrm/mg-bot-api-client-go.git
synced 2025-03-29 02:59:50 +03:00
Added deserialization of message attachments
This commit is contained in:
commit
cf53df6f9f
1 changed files with 12 additions and 0 deletions
12
v1/types.go
12
v1/types.go
|
@ -405,6 +405,7 @@ type (
|
|||
Order *MessageOrder `json:"order,omitempty"`
|
||||
*TextMessage
|
||||
*SystemMessage
|
||||
*AttachmentList
|
||||
}
|
||||
|
||||
TextMessage struct {
|
||||
|
@ -431,6 +432,17 @@ type (
|
|||
From *UserRef `json:"from"`
|
||||
}
|
||||
|
||||
AttachmentList struct {
|
||||
Items []Attachment `json:"items"`
|
||||
}
|
||||
|
||||
Attachment struct {
|
||||
ID uint64 `json:"id"`
|
||||
Mime string `json:"type"`
|
||||
Caption string `json:"caption"`
|
||||
Size uint64 `json:"size"`
|
||||
}
|
||||
|
||||
MessageProduct struct {
|
||||
ID uint64 `json:"id"`
|
||||
Name string `json:"name"`
|
||||
|
|
Loading…
Add table
Reference in a new issue