aboutsummaryrefslogtreecommitdiff
path: root/telegram/utils.go
diff options
context:
space:
mode:
authorBohdan Horbeshko <bodqhrohro@gmail.com>2022-02-04 18:56:34 +0300
committerBohdan Horbeshko <bodqhrohro@gmail.com>2022-02-04 18:56:34 +0300
commit39d38fb487c0e09be63a5c50e3cb13211fe7b12c (patch)
treeee4993c4fb63db5d5af5fa76695ea5c7fc53dd96 /telegram/utils.go
parentf7e46d5033660d12371e68e8e41586573086d156 (diff)
Fix links to tiny images
Diffstat (limited to 'telegram/utils.go')
-rw-r--r--telegram/utils.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/telegram/utils.go b/telegram/utils.go
index ffa50b4..87176fc 100644
--- a/telegram/utils.go
+++ b/telegram/utils.go
@@ -480,7 +480,7 @@ func (c *Client) contentToFilename(content client.MessageContent) (*client.File,
case client.TypeMessagePhoto:
photo, _ := content.(*client.MessagePhoto)
sizes := photo.Photo.Sizes
- if len(sizes) > 1 {
+ if len(sizes) >= 1 {
file := sizes[len(sizes)-1].Photo
return file, strconv.FormatInt(int64(file.Id), 10) + ".jpg"
}