fix(feishu): fix webhook mode silent exit and receive_id_type default
- monitor.ts: throw error for webhook mode instead of silently returning, so gateway properly marks channel as failed - targets.ts: default receive_id_type to "user_id" instead of "open_id" for non-prefixed IDs, fixing message delivery for enterprise user IDs Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>main
parent
7e32f1ce20
commit
8ba1387ba2
|
|
@ -55,7 +55,9 @@ export async function monitorFeishuProvider(opts: MonitorFeishuOpts = {}): Promi
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
log("feishu: webhook mode not implemented in monitor, use HTTP server directly");
|
throw new Error(
|
||||||
|
"feishu: webhook mode not implemented in monitor. Use websocket mode or configure an external HTTP server.",
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
async function monitorWebSocket(params: {
|
async function monitorWebSocket(params: {
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,8 @@ export function resolveReceiveIdType(id: string): "chat_id" | "open_id" | "user_
|
||||||
if (trimmed.startsWith(OPEN_ID_PREFIX)) {
|
if (trimmed.startsWith(OPEN_ID_PREFIX)) {
|
||||||
return "open_id";
|
return "open_id";
|
||||||
}
|
}
|
||||||
return "open_id";
|
// Default to user_id for other alphanumeric IDs (e.g., enterprise user IDs)
|
||||||
|
return "user_id";
|
||||||
}
|
}
|
||||||
|
|
||||||
export function looksLikeFeishuId(raw: string): boolean {
|
export function looksLikeFeishuId(raw: string): boolean {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue