Skip to content

Conversation

@shangxueink
Copy link
Contributor

@shangxueink shangxueink commented Oct 14, 2025

Motivation / 动机

此项更改旨在增强 Satori 适配器对多媒体消息类型的支持。

在之前的版本中,Satori 适配器无法正确处理或发送视频 (Video) 和回复 (Reply) 消息类型。

Modifications / 改动点

本次改动主要集中在 SatoriPlatformEvent 类中,具体修改了 send_with_adaptersend 方法。
核心改动点包括:

  1. 增加了对 Video 消息组件的判断和处理。当遇到 Video 组件时,会将其转换为文件路径 URL,并生成 Satori 的 <video src="{video_path_url}"/> 标签。
  2. 增加了对 Reply 消息组件的判断和处理。当遇到 Reply 组件时,会生成 Satori 的 <reply id="{component.id}"/> 标签,以支持消息回复功能。

Compatibility & Breaking Changes / 兼容性与破坏性变更

  • 这是一个破坏性变更 (Breaking Change)。/ This is a breaking change.
  • 这不是一个破坏性变更。/ This is NOT a breaking change.

此项改动是功能增强,仅在 Satori 适配器中增加了对 VideoReply 消息组件的处理逻辑。

它不会影响现有功能的行为,也不引入任何破坏性变更。所有旧的消息类型和发送方式仍然兼容。


Checklist / 检查清单

  • 😊 如果 PR 中有新加入的功能,已经通过 Issue / 邮件等方式和作者讨论过。/ If there are new features added in the PR, I have discussed it with the authors through issues/emails, etc.
  • 👀 我的更改经过了良好的测试,并已在上方提供了“验证步骤”和“运行截图”。/ My changes have been well-tested, and "Verification Steps" and "Screenshots" have been provided above.
  • 🤓 我确保没有引入新依赖库,或者引入了新依赖库的同时将其添加到了 requirements.txtpyproject.toml 文件相应位置。/ I have ensured that no new dependencies are introduced, OR if new dependencies are introduced, they have been added to the appropriate locations in requirements.txt and pyproject.toml.
  • 😮 我的更改没有引入恶意代码。/ My changes do not introduce malicious code.

Sourcery 总结

增强 Satori 适配器,使其发送方法能够处理视频 (Video) 和回复 (Reply) 消息类型,从而为这些组件生成适当的媒体标签。

新功能:

  • Satori 适配器支持视频 (Video) 消息组件,将其转换为 <video> 标签
  • Satori 适配器支持回复 (Reply) 消息组件,将其转换为 <reply> 标签
Original summary in English

Summary by Sourcery

Enhance Satori adapter to handle Video and Reply message types in its send methods, enabling proper media tag generation for these components

New Features:

  • Support Video message components in Satori adapter by converting them to
  • Support Reply message components in Satori adapter by converting them to tags

@auto-assign auto-assign bot requested review from Larch-C and advent259141 October 14, 2025 06:46
Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

你好 - 我已经审查了你的更改,它们看起来很棒!


Sourcery 对开源免费 - 如果你喜欢我们的评论,请考虑分享它们 ✨
帮助我更有用!请点击每个评论上的👍或👎,我将利用这些反馈来改进你的评论。
Original comment in English

Hey there - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@Soulter Soulter merged commit 9119f71 into AstrBotDevs:master Oct 15, 2025
4 checks passed
@Soulter Soulter changed the title feat: satori适配器的video、reply消息类型 feat: satori 适配器支持 video、reply 消息类型 Oct 15, 2025
@shangxueink shangxueink deleted the patch-satori-video-reply branch October 16, 2025 10:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants