Changes
client.apiaccepts typed raw objects viacall, resolves entity inputs and supports per-call DC, timeout, cancellation and retry options- Raw updates expose
event.contextfor chat access; the existing middlewarenext()argument is unchanged client.updates.watchshares polling capacity across channels instead of rejecting subscriptions beyond the polling limit; larger lists are polled less frequently- Connection lifecycle subscriptions:
onConnecting,onConnect,onDisconnect,onReconnectingandonReconnect(#41) - High-level Communities methods for creation, peer links, requests, participants, notifications and grouped dialogs; pass
includeCommunities: trueto include community rows ingetDialogsanditerDialogs - Experimental WEB relay transport through the existing
proxyoption
Fixes
- Update recovery preserves independent sequences, deduplicates buffered updates and avoids retry storms
- Invalid authorization suspends update polling; fresh sessions wait for sign-in before recovering updates
- Disconnecting stops stale ping loops; reconnect callbacks run after the catch-up attempt
- Watch filters, subscription cleanup and chat context initialization are applied consistently
- ESM directory and deep imports resolve correctly alongside CommonJS (#43)
- API declarations preserve
EntityLikeinputs and mutable parameter types, accept readonly call inputs and avoid slow raw-call completions - Declaration checks pass without
skipLibCheckon TypeScript 4.9 and 5.9 with compatible Node.js types; keyboard builder types are fixed - Store sessions reuse legacy absolute-path directories, isolate account deletion and resolve cached peers correctly
- Sign-in handles email codes, authentication restarts and successful code resends
- MTProxy fake TLS and padded framing, Telegram media timeout retries, iterator limits and participant pagination are corrected
- Forwarded messages return a flat list; MarkdownV2 and HTML preserve formatting entities
Upgrade
npm i teleproto@1.229.1