Skip to content

Commit

Permalink
file: change FileSize type to int64
Browse files Browse the repository at this point in the history
  • Loading branch information
demget committed Oct 5, 2022
1 parent d9b2c62 commit b16c14c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion file.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down
2 changes: 1 addition & 1 deletion sendable.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit b16c14c

Please sign in to comment.