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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user