From b16c14c6155508d9e87414a713cafa7d293a3edc Mon Sep 17 00:00:00 2001 From: Demian Date: Wed, 5 Oct 2022 15:06:04 +0300 Subject: [PATCH] file: change FileSize type to int64 --- file.go | 2 +- sendable.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/file.go b/file.go index dc7ffbb..14c40f9 100644 --- a/file.go +++ b/file.go @@ -9,7 +9,7 @@ import ( type File struct { FileID string `json:"file_id"` UniqueID string `json:"file_unique_id"` - FileSize int `json:"file_size"` + FileSize int64 `json:"file_size"` // FilePath is used for files on Telegram server. FilePath string `json:"file_path"` diff --git a/sendable.go b/sendable.go index a91233e..38d8b48 100644 --- a/sendable.go +++ b/sendable.go @@ -87,7 +87,7 @@ func (d *Document) Send(b *Bot, to Recipient, opt *SendOptions) (*Message, error b.embedSendOptions(params, opt) if d.FileSize != 0 { - params["file_size"] = strconv.Itoa(d.FileSize) + params["file_size"] = strconv.FormatInt(d.FileSize, 10) } if d.DisableTypeDetection { params["disable_content_type_detection"] = "true"