Skip to content

fix(api): handle multiple file params, fix parse_mode defaults#31

Merged
wrxck merged 4 commits intodevelopfrom
fix/issue-30-file-uploads
Feb 16, 2026
Merged

fix(api): handle multiple file params, fix parse_mode defaults#31
wrxck merged 4 commits intodevelopfrom
fix/issue-30-file-uploads

Conversation

@wrxck
Copy link
Owner

@wrxck wrxck commented Feb 16, 2026

Summary

Fixes #30 - api.request only processed one file entry via next(file), causing thumbnails to be lost and potentially dropping the primary media when both a file and thumbnail were provided.

  • Core fix: Changed api.request file handling from next(file) (single entry) to for loop (all entries), fixing send_video, send_audio, send_document, send_animation, and send_video_note when thumbnails are provided
  • parse_mode fix: send_reply, input_text_message_content, and send_inline_article were using deprecated 'markdown' instead of 'MarkdownV2' for boolean parse_mode = true
  • Missing params: Added question_parse_mode and question_entities to send_poll (Bot API 7.3+)
  • Test infra: Added comprehensive unit tests for all media methods, e2e test suite (busted --run e2e), .gitignore, and .env support
  • Version bump: 3.0-0 -> 3.1-0

Test plan

  • Unit tests pass (455 successes, luacheck clean)
  • E2E tests pass against real Telegram Bot API (24/24)
  • CI passes on PR

Matt Hesketh added 3 commits February 12, 2026 00:24
Add CI pipeline with test matrix (Lua 5.3, 5.4, LuaJIT) and lint job.
Fix 16 luacheck warnings: unused imports, variable shadowing, style.
Fixes #30 - api.request only processed one file entry via next(file),
causing thumbnails to be lost and potentially dropping the primary media
when both a file and thumbnail were provided. Changed to iterate all
entries with a for loop.

Also fixes:
- send_reply, input_text_message_content, and send_inline_article using
  deprecated 'markdown' instead of 'MarkdownV2' for boolean parse_mode
- send_poll missing question_parse_mode and question_entities params
  (added in Bot API 7.3)

Adds comprehensive unit tests for all media methods, e2e test suite
(busted --run e2e), .gitignore, and bumps version to 3.1-0.
@wrxck wrxck changed the base branch from main to develop February 16, 2026 23:27
Add comprehensive e2e tests for bot profile (name/description set/get/restore
with language_code), scoped commands, admin rights, menu button, webhook opts,
forum topic icon stickers, user profile photos, available gifts, sticker sets,
invoice links, custom emoji stickers, and error-case coverage for all send
methods, chat management, inline queries, games, and passport.
@wrxck wrxck merged commit 700b24f into develop Feb 16, 2026
3 checks passed
@wrxck wrxck deleted the fix/issue-30-file-uploads branch February 16, 2026 23:40
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.

bug: send_video ignores caption and other opts when sending by file_id

1 participant