bug fix issue-614

pull/622/head
BigfufuOuO 2025-03-30 22:16:16 +08:00
parent 8ce971f230
commit 619a2b2769
1 changed files with 4 additions and 1 deletions

View File

@ -79,7 +79,10 @@ class MessageRecv(Message):
if message_segment.get("data", "") == "[json]":
# 提取json消息中的展示信息
pattern = r"\[CQ:json,data=(?P<json_data>.+?)\]"
pattern = re.compile(
r"\[CQ:json,data=(?P<json_data>.+?)\]",
re.DOTALL
)
match = re.search(pattern, message_dict.get("raw_message", ""))
raw_json = html.unescape(match.group("json_data"))
try: