From 33ba969e2d7d359e70ba637bcb38947aa3aac4b8 Mon Sep 17 00:00:00 2001 From: StarHeartHunt Date: Thu, 2 Nov 2023 12:45:22 +0800 Subject: [PATCH] :bug: fix test construct --- nonebot/adapters/feishu/message.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nonebot/adapters/feishu/message.py b/nonebot/adapters/feishu/message.py index c911539..5e38da2 100644 --- a/nonebot/adapters/feishu/message.py +++ b/nonebot/adapters/feishu/message.py @@ -622,16 +622,16 @@ def deserialize( } if message_type == "text": - text = parsed_content["text"] + text: str = parsed_content["text"] text_begin = 0 for embed in re.finditer( r"(?P(?:@))(?P\w+)", text, ): - matched = text[text_begin : embed.pos + embed.start()] + matched: str = text[text_begin : embed.pos + embed.start()] if matched: - msg.extend(Message(Text("text", matched))) + msg.extend(Message(Text("text", {"text": matched}))) text_begin = embed.pos + embed.end() if embed.group("type") == "@":