mirror of
https://github.com/retailcrm/mg-bot-api-client-go.git
synced 2024-11-21 20:36:05 +03:00
feat: Added deserialization of message attachments
This commit is contained in:
parent
864572b667
commit
7e9444732e
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…
Reference in New Issue
Block a user