mirror of
https://github.com/retailcrm/mg-bot-api-client-go.git
synced 2024-11-25 06:16:03 +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"`
|
Order *MessageOrder `json:"order,omitempty"`
|
||||||
*TextMessage
|
*TextMessage
|
||||||
*SystemMessage
|
*SystemMessage
|
||||||
|
*AttachmentList
|
||||||
}
|
}
|
||||||
|
|
||||||
TextMessage struct {
|
TextMessage struct {
|
||||||
@ -431,6 +432,17 @@ type (
|
|||||||
From *UserRef `json:"from"`
|
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 {
|
MessageProduct struct {
|
||||||
ID uint64 `json:"id"`
|
ID uint64 `json:"id"`
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
|
Loading…
Reference in New Issue
Block a user