aboutsummaryrefslogtreecommitdiff
path: root/telegram
diff options
context:
space:
mode:
Diffstat (limited to 'telegram')
-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