aboutsummaryrefslogtreecommitdiff
path: root/telegram/utils.go
diff options
context:
space:
mode:
authorBohdan Horbeshko <bodqhrohro@gmail.com>2022-06-30 03:33:51 +0300
committerBohdan Horbeshko <bodqhrohro@gmail.com>2022-06-30 03:33:51 +0300
commite2edbe37ea47eef9366a0d9d6b38228cdfec015a (patch)
tree500423cd451203cc500f9e97be99b5b30fa8f991 /telegram/utils.go
parent501c1a7daa44843b1c43502167750bbb3465555d (diff)
gofmt
Diffstat (limited to 'telegram/utils.go')
-rw-r--r--telegram/utils.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/telegram/utils.go b/telegram/utils.go
index 4c365a3..99f9b68 100644
--- a/telegram/utils.go
+++ b/telegram/utils.go
@@ -1009,8 +1009,9 @@ func (c *Client) OpenPhotoFile(photoFile *client.File, priority int32) (*os.File
file, err := os.Open(path)
if err == nil {
return file, path, nil
+ } else
// obtain the photo right now if still not downloaded
- } else if !photoFile.Local.IsDownloadingCompleted {
+ if !photoFile.Local.IsDownloadingCompleted {
tdFile, tdErr := c.DownloadFile(photoFile.Id, priority, true)
if tdErr == nil {
path = tdFile.Local.Path