fix: forward msg send fail in lark and discord

This commit is contained in:
Junyan Qin
2025-02-04 12:07:15 +08:00
parent dbece6af7f
commit 0f2cb58897
5 changed files with 21 additions and 25 deletions

View File

@@ -55,6 +55,11 @@ class DiscordMessageConverter(adapter.MessageConverter):
image_files.append(discord.File(fp=image_bytes, filename=f"{uuid.uuid4()}.png"))
elif isinstance(ele, platform_message.Plain):
text_string += ele.text
elif isinstance(ele, platform_message.Forward):
for node in ele.node_list:
text_string, image_files = await DiscordMessageConverter.yiri2target(node.message_chain)
text_string += text_string
image_files.extend(image_files)
return text_string, image_files