spam-rescue: своё название (KH Build) не считается словом отбора
All checks were successful
ci / test (push) Successful in 51s
ci / deploy (push) Successful in 2m46s

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-30 14:15:53 +03:00
parent 1e4bf87857
commit f06fe97561

View File

@@ -67,7 +67,7 @@ export async function loadRules(pool: Pool): Promise<RescueRules> {
const numbers = new Set<string>(); const numbers = new Set<string>();
const add = (s: string | null | undefined): void => { const add = (s: string | null | undefined): void => {
const n = s ? normalizeTerm(s) : null; const n = s ? normalizeTerm(s) : null;
if (n) terms.add(n); if (n && !/^kh ?build/.test(n)) terms.add(n); // своё название встречается в каждом письме
}; };
const vendors = await pool.query<{ display_name: string | null; company_name: string | null }>("select display_name, company_name from qbo_vendor where active"); const vendors = await pool.query<{ display_name: string | null; company_name: string | null }>("select display_name, company_name from qbo_vendor where active");
for (const v of vendors.rows) { for (const v of vendors.rows) {