feat: detect and persist Telegram Premium status after authentication

After TDLib login completes, calls getMe() to detect isPremium, persists
it to DB via updateAccountPremiumStatus, and returns { client, isPremium }
from createTdlibClient. All callers updated to destructure accordingly.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-02 23:02:46 +02:00
parent f454303352
commit 436a576085
7 changed files with 38 additions and 13 deletions

View File

@@ -49,7 +49,7 @@ export async function processManualUpload(uploadId: string): Promise<void> {
const account = accounts[0];
if (!account) throw new Error("No authenticated Telegram account available");
const client = await createTdlibClient({ id: account.id, phone: account.phone });
const { client } = await createTdlibClient({ id: account.id, phone: account.phone });
try {
const packageIds: string[] = [];