Skip to content

fix(minimax-bot): 队列只从成员表出,管理员不在表里也有成员接话 - #100

Merged
MyPrototypeWhat merged 5 commits into
MiniMax-AI:mainfrom
Apageoflove:fix/group-queue-membership
Nov 3, 2026
Merged

MyPrototypeWhat merged 5 commits into
MiniMax-AI:mainfrom
Apageoflove:fix/group-queue-membership

Conversation

@Apageoflove

@Apageoflove Apageoflove commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

群里 replyMode=admin 且管理员不在成员表时,每条未@消息都会静默失声:groupQueue 把 adminId 排进队列,driveGroup 里一句 continue 把它跳过,消息最后标成 cancelled,用户既看不到回复也看不到解释。0.7.8 及更早版本创建的群会把这种状态落盘,升级后依旧可触发,issue #63 里我的评论就是实测。

现在队列只从成员表构建:admin 模式下管理员在表里就排第一,不在表里就回退给第一个成员;all 模式只排真实成员;成员表为空返回空队列。@ 提及照旧优先。issue #63 的 B1(每条消息都要有下文)在这个洞上从此成立。

测试:新增 tests/group-queue.test.mjs,覆盖 admin 是成员、不在表、缺省、成员表为空、all 模式、@ 优先这六种情形,写在四个用例里。全量 node --test 365 例全过。

边界:未验证真实 IM 环境里旧状态升级后的端到端表现,本地只跑了单测;另外「admin 不在成员表时回退给第一个成员」是否符合你们对 admin 语义的预期(还是宁可明确报配置错误),留给你们定,需要改我就改。

Refs #63


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

@MyPrototypeWhat MyPrototypeWhat left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for tracking this down. Approving.

When the admin wasn't on the member list, every message without an @mention was silently dropped, so this was a nasty one. The fix is small and easy to follow:

  • Building the queue only from memberIds means driveGroup never gets a speaker it will skip.
  • Falling back to the first member when the admin isn't listed keeps the group talking.
  • Keeping the new tests in the plugin's own tests/ folder, outside the root test/ and CI, is the right call.

Verified

  • Checked at f0c1820.
  • CI passes, and npm run check passes locally.
  • The version is 0.7.20 in package.json, plugin.json, serverInfo in mcp.mjs, and the README, which keeps it clear of #97, #98 and #102.
  • Plugin tests pass locally at 344/347, including the 4 new tests. The 3 failures are the emoji picker tests, which fail on main in my environment too.

Optional

  • The description mentions 6 cases, but the file has 4 test() blocks, so you may want to adjust the wording.

On your question about falling back to the first member versus reporting a configuration error, I'll leave that to the maintainers.

@MyPrototypeWhat
MyPrototypeWhat merged commit 8abfa32 into MiniMax-AI:main Nov 3, 2026
1 check passed
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