Skip to content

fix: Slack Socket Mode messages dropped when team field missing#302

Merged
bamdadd merged 1 commit into
mainfrom
fix/slack-missing-team-field
Apr 7, 2026
Merged

fix: Slack Socket Mode messages dropped when team field missing#302
bamdadd merged 1 commit into
mainfrom
fix/slack-missing-team-field

Conversation

@bamdadd

@bamdadd bamdadd commented Apr 7, 2026

Copy link
Copy Markdown
Owner

Summary

  • DM events and Enterprise Grid events don't include the team field, causing translate_message_event to silently return None
  • Now falls back to user_team field, then connection_id, then "unknown"
  • Added debug logging in socket_listener.py when messages are skipped

Test plan

  • 15 tests pass including 3 new ones for missing team scenarios
  • Send a DM to the bot and verify message is processed
  • Verify im:read scope is approved on Slack app side

🤖 Generated with Claude Code

DM events and Enterprise Grid events don't always include the `team`
field, causing `translate_message_event` to return None. Now falls back
to `user_team` field, then `connection_id`, then "unknown".

Also adds debug logging when messages are skipped for easier diagnosis.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@bamdadd
bamdadd merged commit 671b908 into main Apr 7, 2026
6 checks passed
@bamdadd
bamdadd deleted the fix/slack-missing-team-field branch April 7, 2026 21:10
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