1
0
mirror of https://github.com/Mrs4s/go-cqhttp.git synced 2025-05-04 19:17:37 +08:00

fix: simplify bool checking

This commit is contained in:
Maiko Tan 2023-01-06 12:57:19 +08:00
parent 2a4ea28f4d
commit 524debbfda
No known key found for this signature in database
GPG Key ID: 0F3B49C721E5F453

View File

@ -157,7 +157,7 @@ func (bot *CQBot) uploadLocalImage(target message.Source, img *LocalImageElement
if !ok { if !ok {
return nil, errors.New("image type error: " + mt) return nil, errors.New("image type error: " + mt)
} }
if mt == "image/webp" && base.ConvertWebpImage != false { if mt == "image/webp" && base.ConvertWebpImage {
newname := img.File + ".png" newname := img.File + ".png"
err := global.ConvertImagePng(img.File, newname) err := global.ConvertImagePng(img.File, newname)
if err != nil { if err != nil {