Repository navigation
feat(listener): 支持用户身份关键词匹配 - #2777
Merged
deepcoldy merged 1 commit intoNov 4, 2026
Merged
Conversation
dafeizhou
requested review from
47seek,
LucasIcarus,
deepcoldy,
xiaoxueSunn and
xiongz-c
as code owners
November 4, 2026 08:56
Owner
|
感谢贡献,已合并(squash 为 0f78bbe,保留了你的作者署名)。 评审与合并态(相对最新 master 无冲突,合并树 build/tsc/相关测试全绿)都已通过。有三条非阻断的小项,我们会另开一个 follow-up PR 处理,不影响本次功能:
欢迎继续贡献。 |
This was referenced Nov 4, 2026
|
🚀 Released in v3.57.1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
消息监听的关键词目前只匹配正文,飞书
@_user_N又只在单条消息内有效,无法稳定表达“出现某个词且 @ 指定成员”。本次在现有关键词匹配中加入用户身份条件,文字和身份共用任一 / 全部匹配方式。open_id;全局规则及群自定义规则均支持,同一应用内跨群生效。contentPolicy.includeMentionedOpenIds匹配原生 text/post 的真实 mentions 或 at 节点;显示名、发送者本人、手打 @ 文本及转发卡片的历史 mentions 不满足身份条件。示例:文字关键词填
ask,添加一个用户身份关键词,选择“全部命中”,即可同时要求文字出现和真实 @;不绑定任何固定指令或账号。影响面:消息监听共用评估入口覆盖实时事件、历史补扫、预览 / 试运行,发生在启动 CLI 之前,对各 CLI / 后端一致。显式 @ 当前 Bot 的路由及旧纯文本规则不变。富文本身份提取复用现有语言正文解析,支持与文字投影相同的 locale;不涉及平台特有进程逻辑。
验证(Bun 1.4.3):
bun run build bun run test -- test/message-listener test/dashboard-message-listeners test/dashboard-listener test/bot-registry.test.ts test/message-parser.test.ts test/substitute- test/dashboard-i18n使用方式及配置示例见说明文档。