From 942b7f257cbb427201fc1da73393cbc02e6d5304 Mon Sep 17 00:00:00 2001 From: SlyAimer <2289782085@qq.com> Date: Fri, 14 Mar 2025 13:41:46 +0800 Subject: [PATCH] =?UTF-8?q?fix(touch):=20=E4=BF=AE=E5=A4=8D=E5=A4=B4?= =?UTF-8?q?=E5=83=8F=E7=BC=93=E5=AD=98=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 下载 QQ头像后立即删除,防止缓存 - 优化了触碰功能中的头像处理流程 --- src/plugins/touch.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/plugins/touch.py b/src/plugins/touch.py index 1406ada..5b175b7 100644 --- a/src/plugins/touch.py +++ b/src/plugins/touch.py @@ -24,8 +24,10 @@ async def handle_touch(message: MessageEvent): result = await QrTouch.touch(0) q.reply_touch_content = result.reply_touch_content await QrTouchLog.insert_touch_log(q, member_openid) - local_gif = rua(await download_qq_image_by_account(None)).add_gif() + qq_head_image = await download_qq_image_by_account(None) + local_gif = rua(qq_head_image).add_gif() msg = Message([MessageSegment.file_image(Path(local_gif)), MessageSegment.text(result.reply_touch_content),]) + await delete_file(qq_head_image) await delete_file(local_gif) await to.finish(msg)