From 090f9008b63664da9feff123cc8db593f6cde3a9 Mon Sep 17 00:00:00 2001 From: Weilong Liao <37870767+Soulter@users.noreply.github.com> Date: Thu, 25 Jun 2026 17:07:08 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20revert=20"fix:=20preserve=20At=20compo?= =?UTF-8?q?nents=20when=20sending=20messages=20on=20qq=5Fofficial=20plat?= =?UTF-8?q?=E2=80=A6"=20(#9004)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit bc117038fb1bdf27061c07488a99f80c1ae26a88. --- .../platform/sources/qqofficial/qqofficial_message_event.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/astrbot/core/platform/sources/qqofficial/qqofficial_message_event.py b/astrbot/core/platform/sources/qqofficial/qqofficial_message_event.py index f19f15354..68a93b09b 100644 --- a/astrbot/core/platform/sources/qqofficial/qqofficial_message_event.py +++ b/astrbot/core/platform/sources/qqofficial/qqofficial_message_event.py @@ -25,7 +25,7 @@ from tenacity import ( from astrbot.api import logger from astrbot.api.event import AstrMessageEvent, MessageChain -from astrbot.api.message_components import At, File, Image, Plain, Record, Video +from astrbot.api.message_components import File, Image, Plain, Record, Video from astrbot.api.platform import AstrBotMessage, PlatformMetadata from astrbot.core.utils.media_utils import MediaResolver, file_uri_to_path, is_file_uri @@ -747,10 +747,6 @@ class QQOfficialMessageEvent(AstrMessageEvent): file_source = file_path elif i.url: file_source = i.url - elif isinstance(i, At): - qq_id = getattr(i, "qq", "") - if qq_id and qq_id != "all": - plain_text += f"<@{qq_id}>" else: logger.debug(f"qq_official 忽略 {i.type}") return (