From 0aafe8a8a7ad45142f23654bfbb17cb9b320545b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A2=85=E9=9B=B6=E8=90=BD?= <244481215+hicocos@users.noreply.github.com> Date: Fri, 2 Oct 2026 22:17:36 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E5=88=A0=E9=99=A4=E4=B8=80=E6=AC=A1?= =?UTF-8?q?=E6=80=A7=E8=84=9A=E6=9C=AC=20verify=5Fprivate=5Finvite=5Fsuppo?= =?UTF-8?q?rt.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../scripts/verify_private_invite_support.py | 31 ------------------- 1 file changed, 31 deletions(-) delete mode 100644 backend/scripts/verify_private_invite_support.py diff --git a/backend/scripts/verify_private_invite_support.py b/backend/scripts/verify_private_invite_support.py deleted file mode 100644 index bc13c27..0000000 --- a/backend/scripts/verify_private_invite_support.py +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/env python3 -from pathlib import Path - -root = Path(__file__).resolve().parents[1] -jobs = (root / 'src/services/telegramChannelJobs.ts').read_text() -schema = (root / 'src/db/schema.sql').read_text() -presentation = (root / 'src/bot/presentation/subscription.ts').read_text() - -date_download_block = jobs[jobs.index('export async function enqueueTelegramDateDownload'):jobs.index('async function getMessagesByHashtag')] -tag_download_block = jobs[jobs.index('export async function enqueueTelegramTagDownload'):jobs.index('export async function listTelegramActiveTaskQueues')] - -checks = [ - ('private invite detector', 'parseTelegramPrivateInviteHash' in jobs and 't.me/+hash' in jobs), - ('check chat invite API', 'messages.CheckChatInvite' in jobs and 'ChatInviteAlready' in jobs), - ('no auto join import invite', 'ImportChatInvite' not in jobs), - ('date download resolves private invites before job creation', 'resolveTelegramSource(userClient, sourceInput)' in date_download_block and 'const source = resolved.source' in date_download_block), - ('tag download resolves private invites before job creation', 'resolveTelegramSource(userClient, sourceInput)' in tag_download_block and 'const source = resolved.source' in tag_download_block), - ('stable peer persistence', 'source_original' in schema and 'source_type' in schema and 'disabled_reason' in schema), - ('subscription pause on inaccessible source', 'pauseTelegramSubscriptionForError' in jobs and 'enabled = false' in jobs and 'disabled_reason' in jobs), - ('subscription list warning', 'disabled_reason' in presentation and '上次扫描' in presentation), - ('explicit not joined wording', '尚未加入这个私密频道/群' in jobs), - ('expired/invalid invite wording', '邀请链接已过期' in jobs and '邀请链接无效' in jobs), -] - -failed = [name for name, ok in checks if not ok] -if failed: - print('FAIL private invite support checks:') - for name in failed: - print(f'- {name}') - raise SystemExit(1) -print('PASS private invite support checks')