From 778d09d74af6c91033d74dfc6f24f04d49afe82e Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Mon, 16 Sep 2024 20:40:57 +0800 Subject: [PATCH] :sparkles: Lookup now will ignore case to find sticker --- pkg/internal/services/stickers.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/internal/services/stickers.go b/pkg/internal/services/stickers.go index f484c47..d767692 100644 --- a/pkg/internal/services/stickers.go +++ b/pkg/internal/services/stickers.go @@ -13,7 +13,7 @@ func GetStickerWithAlias(alias string) (models.Sticker, error) { prefix := viper.GetString("database.prefix") if err := database.C. Joins(fmt.Sprintf("LEFT JOIN %ssticker_packs pk ON pack_id = pk.id", prefix)). - Where("CONCAT(pk.prefix, alias) = ?", alias). + Where("UPPER(CONCAT(pk.prefix, alias)) = UPPER(?)", alias). Preload("Attachment").Preload("Pack"). First(&sticker).Error; err != nil { return sticker, err