Merged
Conversation
Expand the compatibility layer so v2 code runs on v3 with deprecation warnings. Adds positional-arg detection and conversion for api.run(), get_updates(), set_webhook(), send_message() (incl. nil+parse_mode pattern), and all media methods (send_photo, send_video, send_document, send_audio, send_voice, send_animation, send_sticker). Adds migration guide to README with before/after examples.
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
api.run(),get_updates(),set_webhook(), and all media methods (send_photo,send_video,send_document,send_audio,send_voice,send_animation,send_sticker)send_message()compat to handle v2's full positional signature (nilthread_id + parse_mode pattern)Changes
src/compat.lua— expanded from 3 shims to 15 (run, get_updates, set_webhook, send_message fix, 7 media methods)spec/compat_spec.lua— expanded from 10 to 38 tests covering all v2 call patternsREADME.md— added "Migrating from v2" section, fixed module structure listingTest plan