mirror of
https://github.com/retailcrm/mg-bot-api-client-go.git
synced 2024-11-22 04:46:05 +03:00
Added deserialization of message attachments
This commit is contained in:
commit
cf53df6f9f
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