Skip to content

fix(feishu): Prevent error logs from unhandled reaction and read events#332

Merged
Re-bin merged 3 commits intoHKUDS:mainfrom
huhu-tiger:feishu-event-handlers-pr
Mar 7, 2026
Merged

fix(feishu): Prevent error logs from unhandled reaction and read events#332
Re-bin merged 3 commits intoHKUDS:mainfrom
huhu-tiger:feishu-event-handlers-pr

Conversation

@huhu-tiger
Copy link
Copy Markdown
Contributor

Summary

This PR adds event handlers for common Feishu/Lark events that were previously unhandled, preventing error logs from cluttering the application output.

Changes

  • ✅ Register handler for message reaction created events (P2ImMessageReactionCreatedV1)
  • ✅ Register handler for message read events (P2ImMessageMessageReadV1)
  • ✅ Register handler for bot entering p2p chat events (P2ImChatAccessEventBotP2pChatEnteredV1)
  • ✅ Import required event types from lark_oapi.api.im.v1

Motivation

When users interact with the Feishu bot (e.g., reacting to messages, reading messages, or opening chat windows), these events trigger callbacks but were not registered, causing error logs. While these events don't require processing for the bot's core functionality, registering empty handlers prevents unnecessary error messages and improves log cleanliness.

Technical Details

  • Added three new event handler methods with pass-through implementations
  • No changes to existing message processing logic
  • Maintains backward compatibility
  • Follows the existing event handler pattern in the codebase

Testing

  • Tested with Feishu bot in production environment
  • Verified that error logs no longer appear for these events
  • Confirmed that message processing continues to work as expected

Related Issues

Fixes issues with error logs appearing when users:

  • React to bot messages with emojis
  • Mark bot messages as read
  • Open a new chat window with the bot

… chat events

- Register handlers for message reaction created events
- Register handlers for message read events
- Register handlers for bot entering p2p chat events
- Prevent error logs for these common but unprocessed events
- Import required event types from lark_oapi
@Re-bin Re-bin merged commit 4021f52 into HKUDS:main Mar 7, 2026
Mazahir26 added a commit to Mazahir26/nanobot that referenced this pull request Mar 8, 2026
Upstream changes integrated:
- PR HKUDS#1635: Agent config/workspace CLI support
- PR HKUDS#1677: Fix auth allowlist bypass via sender_id token splitting
- PR HKUDS#1467: DingTalk group chat support
- PR HKUDS#436: Preserve Telegram document extension
- PR HKUDS#1482: Telegram topic support
- PR HKUDS#1535: Fix Telegram proxy crash
- PR HKUDS#332: Feishu event handlers
- Azure OpenAI provider support
- Multi-instance path cleanup and workspace override preservation
- Slack empty text response handling
- QQ group @message support

Conflicts resolved:
- .gitignore: Preserved user's tests/ and QWEN.md entries
- nanobot/agent/tools/mcp.py: Merged upstream's SSE transport support with user's dict compatibility for backward compatibility

Tests: 169 passed

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
robottwo pushed a commit to robottwo/nanobot that referenced this pull request Mar 13, 2026
sorker pushed a commit to sorker/nanobot that referenced this pull request Mar 24, 2026
Wattysaid pushed a commit to kieran-assistant/nanobot that referenced this pull request Apr 3, 2026
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