From 7e9444732ef89fd92002990da462fb9f8beb0b2f Mon Sep 17 00:00:00 2001 From: Kirill Zaytsev Date: Thu, 24 Feb 2022 18:29:53 +0300 Subject: [PATCH] feat: Added deserialization of message attachments --- v1/types.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/v1/types.go b/v1/types.go index 0eab27e..78290e4 100644 --- a/v1/types.go +++ b/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"`