Skip to content

Commit

Permalink
✨ add missing resolve for other elements
Browse files Browse the repository at this point in the history
  • Loading branch information
StarHeartHunt committed Oct 23, 2023
1 parent c9da991 commit 374f58c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions nonebot/adapters/feishu/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -606,13 +606,17 @@ def deserialize(

matched = text[text_begin:]
if matched:
msg.extend(Message(Text("text", {"text": text[text_begin:]})))
msg.append(Text("text", {"text": text[text_begin:]}))

elif message_type == "post":
msg.append(Post("post", parsed_content))

else:
msg.append(MessageSegment(message_type, parsed_content))
seg_builder = getattr(MessageSegment, message_type, None)
if seg_builder:
msg.append(seg_builder(**parsed_content))
else:
msg.append(MessageSegment(message_type, parsed_content))

return msg

Expand Down

0 comments on commit 374f58c

Please sign in to comment.