github sanyok12345/teleproto v1.229.0

latest releases: v1.234.0, v1.233.0, v1.232.1...
3 months ago

Changes

  • Layer 229
  • client.updates: a middleware pipeline next to the classic handlers via use, on, catch, watch
  • Update names come from the schema, so all 165 are autocompleted and typed as their exact class
  • client.updates.watch(chat, handler) keeps updates flowing for channels the account is not a member of
  • InlineKeyboard and ReplyKeyboard build markup from a grid, by chaining, or both, and expose every field of their schema placeholder, persistent, colours, icons and the rest
  • Rich messages render the new button and document blocks

Breaking

  • Layer 229 replaced 17 button constructors with keyboardButton and keyboardInlineButton, each carrying a type:
if (button instanceof Api.KeyboardInlineButton
    && button.type instanceof Api.InlineButtonTypeCallback) handle(button.type.data);

Button.*, MessageButton and the buttons: option are unchanged.

  • Generated input unions are now TypeXIn instead of XIn, which collided with the constructor of the same name

Fixes

  • Files stored on another datacenter are requested from that datacenter instead of migrating on every part
  • Abort listeners no longer pile up on a caller's AbortSignal
  • A flapping link backs off instead of reconnecting 20 times a second, and connection attempts follow a 1…64 second ladder
  • Socket errors carry the stack of the failure, not of the module
  • Quizzes with more than ten answers are accepted (#38)
  • singleUse and selective reach the reply keyboard instead of overwriting resize
  • Six modules could not be imported on their own; the library has no runtime import cycles left

Upgrade

  • npm i teleproto@latest

Don't miss a new teleproto release

NewReleases is sending notifications on new releases.