Skip to content

feat: 飞书群聊仅响应 @机器人 的消息#155

Closed
shellmind112 wants to merge 1 commit intofeishu/sessionfrom
feishu/group-mention
Closed

feat: 飞书群聊仅响应 @机器人 的消息#155
shellmind112 wants to merge 1 commit intofeishu/sessionfrom
feishu/group-mention

Conversation

@shellmind112
Copy link
Copy Markdown
Collaborator

@shellmind112 shellmind112 commented Apr 7, 2026

Issue for this PR

Closes #150
Depends on #154

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

修复飞书群聊中机器人响应所有消息的问题。

原因:handleMessage 未区分私聊/群聊,飞书 SDK 在群聊中推送所有消息事件,代码直接处理了所有消息。

修复:在 handleMessage 入口检查 message.chat_type,若为 group 则检查 message.mentions 字段,无 @mention 则忽略。同时更新使用说明和架构文档。

How did you verify your code works?

  • 验证群聊中普通消息不触发回复
  • 验证群聊中 @机器人 后正常回复
  • 验证私聊不受影响

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 7, 2026

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 7, 2026

Thanks for updating your PR! It now meets our contributing guidelines. 👍

@shellmind112 shellmind112 changed the title fix: 飞书群聊仅响应 @机器人 的消息 feat: 飞书群聊仅响应 @机器人 的消息 Apr 7, 2026
@shellmind112 shellmind112 force-pushed the feishu/group-mention branch from 5bb141b to ec4d85c Compare April 9, 2026 15:12
@shellmind112 shellmind112 force-pushed the feishu/group-mention branch from ec4d85c to 5bb141b Compare April 9, 2026 15:42
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.

1 participant