From 0d34a9df3ad7979bf58bb8113994454a1766c0df Mon Sep 17 00:00:00 2001 From: SXP-Simon Date: Sun, 8 Feb 2026 19:04:51 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E5=8F=91=E9=80=81?= =?UTF-8?q?=E8=80=85=E5=AD=97=E6=AE=B5=E5=A1=AB=E5=85=85=EF=BC=8C=E7=A1=AE?= =?UTF-8?q?=E4=BF=9D=E5=90=91=E5=90=8E=E5=85=BC=E5=AE=B9=E6=97=A7=E5=88=86?= =?UTF-8?q?=E6=9E=90=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/application/message_converter.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/application/message_converter.py b/src/application/message_converter.py index ba80ca7..bcda88d 100644 --- a/src/application/message_converter.py +++ b/src/application/message_converter.py @@ -154,16 +154,22 @@ class MessageConverter: elif content.type == MessageContentType.VIDEO: message_chain.append({"type": "video", "data": {"url": content.url}}) + # Ensure sender fields are populated, even if missing in original + sender_data = { + "user_id": unified.sender_id, + "nickname": unified.sender_name, + "card": unified.sender_card or "", + } + return { "message_id": unified.message_id, - "sender": { - "user_id": unified.sender_id, - "nickname": unified.sender_name, - "card": unified.sender_card or "", - }, + "sender": sender_data, "group_id": unified.group_id, "message": message_chain, "time": unified.timestamp, + # Add these helper fields for old analyzers that might expect them directly + "raw_message": unified.text_content, + "user_id": unified.sender_id, } @staticmethod