Added deserialization of message attachments

This commit is contained in:
Alex Lushpai 2022-02-25 10:24:18 +03:00 committed by GitHub
commit cf53df6f9f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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