feat:识别群昵称

This commit is contained in:
2025-12-23 16:46:41 +08:00
parent cc250e1f1e
commit 2c564d2870
6 changed files with 320 additions and 15 deletions

View File

@@ -78,6 +78,8 @@ def normalize_message(msg_type: int, data: dict) -> dict:
# 基础消息结构
message = {
"MsgType": msg_type,
# 消息唯一ID用于去重/撤回等)。个微 API 通常为 msgid 字段。
"MsgId": data.get("msgid") or data.get("msg_id") or data.get("id") or "",
"FromWxid": data.get("from_wxid", ""),
"ToWxid": data.get("to_wxid", ""),
"Content": data.get("msg", data.get("content", data.get("raw_msg", ""))), # 系统消息使用 raw_msg