This commit is contained in:
UnCLAS-Prommer
2025-08-11 11:29:05 +08:00
parent 4b59eda5c0
commit 43190b12d2
2 changed files with 3 additions and 1 deletions

View File

@@ -723,7 +723,7 @@ class EmojiManager:
emoji = await self.get_emoji_from_manager(emoji_hash)
if emoji and emoji.emotion:
logger.info(f"[缓存命中] 从内存获取表情包描述: {emoji.emotion}...")
return emoji.emotion
return ",".join(emoji.emotion)
# 如果内存中没有,从数据库查找
self._ensure_db()

View File

@@ -101,6 +101,8 @@ class ImageManager:
image_bytes = base64.b64decode(image_base64)
image_hash = hashlib.md5(image_bytes).hexdigest()
emoji = await emoji_manager.get_emoji_from_manager(image_hash)
if not emoji:
return "[表情包:未知]"
emotion_list = emoji.emotion
tag_str = ",".join(emotion_list)
return f"[表情包:{tag_str}]"