fix(zalo): fix pairing channel detection and webhook payload format

Amp-Thread-ID: https://ampcode.com/threads/T-019bc4e0-fcb1-77be-b0b5-0d498f0c7197
Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
Long
2026-01-16 10:43:14 +07:00
parent 5b827528f8
commit c0c9742e44
7 changed files with 46 additions and 23 deletions

View File

@@ -53,8 +53,11 @@ export async function notifyPairingApproved(params: {
id: string;
cfg: ClawdbotConfig;
runtime?: RuntimeEnv;
/** Extension channels can pass their adapter directly to bypass registry lookup. */
pairingAdapter?: ChannelPairingAdapter;
}): Promise<void> {
const adapter = requirePairingAdapter(params.channelId);
// Extensions may provide adapter directly to bypass ESM module isolation
const adapter = params.pairingAdapter ?? requirePairingAdapter(params.channelId);
if (!adapter.notifyApproval) return;
await adapter.notifyApproval({
cfg: params.cfg,