Skip to content

Conversation

@ocetars
Copy link
Member

@ocetars ocetars commented Jan 7, 2026

Fixes: #4299
白名单检查策略改为 real-time
性能影响:每条消息多几次字典访问 + 一次列表推导式,都是内存操作,开销可忽略。

Modifications / 改动点

platform_settings = self._astrbot_config["platform_settings"]

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

Screenshots or Test Results / 运行截图或测试结果

已按照 issue 方式验证通过


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.

Summary by Sourcery

增强内容:

  • 在白名单检查阶段存储对 Astrbot 配置的引用,并在每条消息上重新计算白名单和标志值,以确保行为始终保持最新。
Original summary in English

Summary by Sourcery

Enhancements:

  • Store a reference to the Astrbot configuration in the whitelist check stage and derive whitelist and flag values on each message for up-to-date behavior.

@auto-assign auto-assign bot requested review from Soulter and advent259141 January 7, 2026 13:02
@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Jan 7, 2026
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 - 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.

@dosubot dosubot bot added the area:core The bug / feature is about astrbot's core, backend label Jan 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:core The bug / feature is about astrbot's core, backend size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] 使用/wl 命令后配置文件修改正常。但是没有重新载入配置文件

1 participant