Skip to content

Add text file support to Telegram attachment handler#33

Open
ace-bot-777 wants to merge 1 commit into
Endgame-Labs:mainfrom
ace-bot-777:feat/txt-attachment-support
Open

Add text file support to Telegram attachment handler#33
ace-bot-777 wants to merge 1 commit into
Endgame-Labs:mainfrom
ace-bot-777:feat/txt-attachment-support

Conversation

@ace-bot-777
Copy link
Copy Markdown
Contributor

Summary

  • Add .txt, .md, .json, .yaml, .yml, and .log to Telegram's allowed attachment extensions
  • Add isTextLikeMIME helper (matching the existing Slack connector implementation) to accept text/* and structured text MIME types like application/json, application/yaml, etc.
  • Add isTextLikeExt helper for content-type validation of text-based uploads by extension
  • Update the user-facing "Supported uploads" message to mention text file types

Test plan

  • go build ./... passes
  • go vet ./... passes
  • go test ./internal/gateway/... passes (updated test expectations)
  • Manual test: send a .txt file via Telegram and confirm it is accepted
  • Manual test: send a .json file via Telegram and confirm it is accepted
  • Manual test: send a .exe file via Telegram and confirm it is still rejected

🤖 Generated with Claude Code

Support .txt, .md, .json, .yaml, .yml, and .log files in the Telegram
connector's attachment whitelist, matching the text-handling already
present in the Slack connector. Adds isTextLikeMIME and isTextLikeExt
helpers for content-type validation of text-based uploads.

Co-Authored-By: Claude Opus 4.6 (1M context) <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

None yet

Development

Successfully merging this pull request may close these issues.

1 participant