Skip to content

bug: Slack file download fails — get_bot_token called with wrong argument #237

Closed

Description

@pavshulin

Summary

SlackAdapter.download_file() passes message.metadata.get("team_id") (a string) to get_bot_token(), but get_bot_token() expects the team_id string directly. However, looking at the actual signature, get_bot_token(self, team_id: str) takes a string — so message.metadata.get("team_id") is correct.

The actual bug: on the dev server, get_bot_token is receiving message (the full NormalizedMessage object) instead of message.metadata.get("team_id").

Fix

# Wrong (passes full message object):
bot_token = self.get_bot_token(message)

# Correct (passes team_id string):
bot_token = self.get_bot_token(message.metadata.get("team_id"))

Impact

All Slack file downloads fail silently — bot token lookup returns None, files are skipped.

Introduced in

PR #235 (Slack inbound file sharing)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority-p1type-bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions