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:
parent
2a4ea28f4d
commit
524debbfda
@ -157,7 +157,7 @@ func (bot *CQBot) uploadLocalImage(target message.Source, img *LocalImageElement
|
||||
if !ok {
|
||||
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"
|
||||
err := global.ConvertImagePng(img.File, newname)
|
||||
if err != nil {
|
||||
|
Loading…
x
Reference in New Issue
Block a user