From 524debbfdae7e5abf86e2f3619511b0d0718d12c Mon Sep 17 00:00:00 2001 From: Maiko Tan Date: Fri, 6 Jan 2023 12:57:19 +0800 Subject: [PATCH] fix: simplify bool checking --- coolq/bot.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/coolq/bot.go b/coolq/bot.go index 3b01e39..0a2fffa 100644 --- a/coolq/bot.go +++ b/coolq/bot.go @@ -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 {