Skip to content

Merge v1.2.9.2_dev into main - #8

Merged
baderouaich merged 26 commits into
mainfrom
v1.2.9.2_dev
Jan 3, 2026
Merged

Merge v1.2.9.2_dev into main#8
baderouaich merged 26 commits into
mainfrom
v1.2.9.2_dev

Conversation

@baderouaich

Copy link
Copy Markdown
Owner

v1.2.9.2

What's Changed

  • Full compatibility with Telegram Api version 9.2
  • Stop getUpdates longpolling on Bot::stop by @6d61676f in Stop getUpdates longpolling on Bot::stop #7
  • Added ErrorCode::REQUEST_CANCELLED for detecting long polling cancellations
  • Upgraded libcpr from v1.11.3 to v1.14.1
  • Fix MaybeInaccessibleMessage invalid variant index
  • Improve Bot commands handling
  • Improve api()->getCache()
  • Improved objects JSON deserialization
  • Expose tgbotxx version macros to user
  • Using std::monostate for optional std::variant instead of an std::optional<std::variant<...>>
  • Allow users to specify api long polling updates limit with api()->setUpdatesLimit(N) - defaulted to 100

New Contributors

Full Changelog: v1.1.9.2...v1.2.9.2

Supported Api methods & Objects (Telegram Api v9.2 and below)

Demos

See examples

baderouaich and others added 24 commits November 29, 2025 19:56
Formerly when `Bot::stop` gets called the former `Bot::m_running`
variable is set to false, but any underlying `cpr::Session::Get/Post`
will block until timing out.

Currently, we set an optional cancellation token from `Bot` in
`Api::sendRequest` so that for `Api::getUpdates` we can exit immediately
after `Bot::stop` is called, without having to call `std::exit`.
Stop getUpdates longpolling on Bot::stop
- Now the bot cancels the long polling request when its stopped for a graceful exit
to be able to reduce the number of updates being parsed in memory tight systems
Only cache when needed
@baderouaich baderouaich self-assigned this Jan 3, 2026
@baderouaich baderouaich added the enhancement New feature or request label Jan 3, 2026
@baderouaich
baderouaich merged commit ab9b69f into main Jan 3, 2026
3 checks passed
github-actions Bot pushed a commit that referenced this pull request Jan 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant