防炸
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -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}]"
|
||||
|
||||
Reference in New Issue
Block a user