From 97dfd1cc00d619008eaf77f19c25c0928be758dc Mon Sep 17 00:00:00 2001 From: bodqhrohro Date: Sun, 1 Dec 2019 15:12:55 +0200 Subject: [PATCH] Fix calculating SHA1 for photo updates --- telegram/utils.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/telegram/utils.go b/telegram/utils.go index 0ae4b45..ac17906 100644 --- a/telegram/utils.go +++ b/telegram/utils.go @@ -137,7 +137,7 @@ func (c *Client) processStatusUpdate(chatID int32, status string, show string, a hash := sha1.New() _, err = io.Copy(hash, file) if err == nil { - photo = string(hash.Sum(nil)) + photo = fmt.Sprintf("%x", hash.Sum(nil)) } else { log.Errorf("Error calculating hash: %v", path) }