From 88d71ffec0672338d52515e93e473dc4f70da514 Mon Sep 17 00:00:00 2001 From: "Foluso ADEBISI (DevBox Aux)" Date: Thu, 1 Oct 2026 11:50:06 +0100 Subject: [PATCH] docs(cropper): explain why the queue's core label maps to uc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- tools/cropper.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/tools/cropper.js b/tools/cropper.js index 8bca1b4..61d1cd2 100644 --- a/tools/cropper.js +++ b/tools/cropper.js @@ -12,7 +12,17 @@ import { stripPhonePrefix, cropPermission } from './permit.js'; const require = createRequire(import.meta.url); 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 BUCKET = 'files'; const REMOVEBG_URL = 'https://removebg.itcass.net/api/removebg';