docs(cropper): explain why the queue's core label maps to uc

Evidence: GET {a2loft}/identity/{code}/units resolves domain codes — uc,
ucth, mtr, uri, yrka are valid, core answers 'Invalid domain code
specified.' The label comes from the Telegram intake hashtag, not a2loft.
This commit is contained in:
2026-10-01 11:50:06 +01:00
parent 645d3d2bc9
commit 88d71ffec0
+11 -1
View File
@@ -12,7 +12,17 @@ import { stripPhonePrefix, cropPermission } from './permit.js';
const require = createRequire(import.meta.url); const require = createRequire(import.meta.url);
const QUEUE_NAME = 'id-images'; const QUEUE_NAME = 'id-images';
/** Queue domains that differ from their a2loft code (legacy bot behaviour). */ /**
* Queue domains that differ from their a2loft identity code.
*
* A queue item's `domain` comes from the Telegram intake: the operator tags a
* photo (e.g. `#core`) and the bot stores that label verbatim, then translated
* it before every a2loft call. a2loft has no `core` domain — `GET
* {a2loft}/identity/core/units` answers "Invalid domain code specified." while
* `uc` is valid — so the label must be mapped before the save is forwarded.
* (The proper fix is on the intake side: enqueue the a2loft code, or register
* `core` upstream; until then this keeps existing queue data working.)
*/
const DOMAIN_ALIASES = { core: 'uc' }; const DOMAIN_ALIASES = { core: 'uc' };
const BUCKET = 'files'; const BUCKET = 'files';
const REMOVEBG_URL = 'https://removebg.itcass.net/api/removebg'; const REMOVEBG_URL = 'https://removebg.itcass.net/api/removebg';