feat: Added deserialization of message attachments

This commit is contained in:
Kirill Zaytsev 2022-02-24 18:29:53 +03:00
parent 864572b667
commit 7e9444732e

View File

@ -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"`