Skip to content

Commit

Permalink
🐛 fix test construct
Browse files Browse the repository at this point in the history
  • Loading branch information
StarHeartHunt committed Nov 2, 2023
1 parent 12eb0af commit 33ba969
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions nonebot/adapters/feishu/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -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<type>(?:@))(?P<key>\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") == "@":
Expand Down

0 comments on commit 33ba969

Please sign in to comment.