aboutsummaryrefslogtreecommitdiff
path: root/telegram/utils.go
diff options
context:
space:
mode:
Diffstat (limited to 'telegram/utils.go')
-rw-r--r--telegram/utils.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/telegram/utils.go b/telegram/utils.go
index da8d849..086b7ae 100644
--- a/telegram/utils.go
+++ b/telegram/utils.go
@@ -178,6 +178,12 @@ func (c *Client) ProcessStatusUpdate(chatID int64, status string, show string, o
var photo string
if chat != nil && chat.Photo != nil {
path := chat.Photo.Small.Local.Path
+ if path == "" {
+ tgFile, err := c.DownloadFile(chat.Photo.Small.Id, 1, true)
+ if err == nil {
+ path = tgFile.Local.Path
+ }
+ }
file, err := os.Open(path)
if err == nil {
defer file.Close()