mirror of
https://github.com/xCyanGrizzly/DragonsStash.git
synced 2026-09-21 13:31:42 +00:00
chore(tdlib): upgrade tdl 8.0.0 → 8.1.0 and prebuilt-tdlib 1.8.50 → 1.8.64
12 versions of TDLib bug fixes, performance improvements, and stricter type definitions in @prebuilt-tdlib/types. Two API breakages handled: 1. `getChatFolders` (plural) was removed — folder IDs now arrive via the `updateChatFolders` update event. Replaced the synchronous call with a 200ms event listener; if no folders arrive, we proceed with just main + archive lists. Chats inside folders are still reachable from chatListMain so this isn't a functional regression. 2. The new tdl `Client.invoke` signature requires a literal `_` field and rejects `Record<string, any>` shapes. Our `invokeWithTimeout` wrapper is intentionally generic — cast through `any` at the call site with a comment explaining why. Both worker and bot type-check + build cleanly with the new versions. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -115,7 +115,10 @@ export async function invokeWithTimeout<T>(
|
||||
}
|
||||
}, timeoutMs);
|
||||
|
||||
(client.invoke(request) as Promise<T>)
|
||||
// The tdl 8.1+ types are very strict about the literal `_` field;
|
||||
// our generic wrapper passes arbitrary requests, so cast through any.
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
(client.invoke(request as any) as Promise<T>)
|
||||
.then((result) => {
|
||||
if (!settled) {
|
||||
settled = true;
|
||||
|
||||
Reference in New Issue
Block a user