Skip to content

fix(bot): add missing sender_name param in Slack and Email channels#3104

Open
scott-kim-7 wants to merge 1 commit into
volcengine:mainfrom
scott-kim-7:fix/bot-channel-missing-sender-name
Open

fix(bot): add missing sender_name param in Slack and Email channels#3104
scott-kim-7 wants to merge 1 commit into
volcengine:mainfrom
scott-kim-7:fix/bot-channel-missing-sender-name

Conversation

@scott-kim-7

Copy link
Copy Markdown

Problem

Commit 4d34025c ("feat(bot):enhance Feishu mentions and name display") added a required sender_name: str parameter to BaseChannel._handle_message() and updated feishu.py, but slack.py and email.py were not updated in the same commit.

This causes a TypeError on every inbound message in both channels:

TypeError: _handle_message() missing 1 required positional argument: 'sender_name'

Because the Slack SDK swallows exceptions raised inside asyncio listener callbacks, the error is completely silent — the bot successfully receives events and adds emoji reactions (👀), but never calls the LLM or sends any reply.

The same issue affects EmailChannel: every polled email triggers a TypeError with no response sent.

Fix

Pass the missing argument in both callers:

  • SlackChannel._on_socket_request: sender_name=sender_id
  • EmailChannel.start: sender_name=sender

Testing

  • Verified by reading git history: git show 4d34025c --name-only confirms only base.py and feishu.py were modified, not slack.py or email.py
  • After applying this fix, Slack bot correctly responds to mentions and DMs

Commit 4d34025 added the required `sender_name` parameter to
`BaseChannel._handle_message()` and updated `feishu.py`, but
`slack.py` and `email.py` were not updated in the same change.

This caused a `TypeError` on every inbound message in both channels.
Because Slack SDK swallows exceptions in asyncio listener callbacks,
the error was silent — the bot received events, added emoji reactions,
but never called the LLM or sent any reply.

Fix: pass `sender_name=sender_id` in SlackChannel and
`sender_name=sender` in EmailChannel.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

1 participant