Fix calculating SHA1 for photo updates

This commit is contained in:
bodqhrohro 2019-12-01 15:12:55 +02:00
parent 1568e29156
commit 97dfd1cc00

View file

@ -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)
}