diff options
author | Bohdan Horbeshko <bodqhrohro@gmail.com> | 2022-06-30 03:33:51 +0300 |
---|---|---|
committer | Bohdan Horbeshko <bodqhrohro@gmail.com> | 2022-06-30 03:33:51 +0300 |
commit | e2edbe37ea47eef9366a0d9d6b38228cdfec015a (patch) | |
tree | 500423cd451203cc500f9e97be99b5b30fa8f991 /telegram | |
parent | 501c1a7daa44843b1c43502167750bbb3465555d (diff) |
gofmt
Diffstat (limited to 'telegram')
-rw-r--r-- | telegram/utils.go | 3 |
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 |