refactor: simplify channel setup conversions

This commit is contained in:
Peter Steinberger
2026-04-11 01:11:02 +01:00
parent 55f35708e1
commit 270630ba35
21 changed files with 37 additions and 29 deletions

View File

@@ -1058,7 +1058,7 @@ export const feishuPlugin: ChannelPlugin<ResolvedFeishuAccount, FeishuProbeResul
return jsonActionResult({ ok: true, reactions });
}
throw new Error(`Unsupported Feishu action: "${String(ctx.action)}"`);
throw new Error(`Unsupported Feishu action: "${ctx.action}"`);
},
},
bindings: {

View File

@@ -42,7 +42,7 @@ export function resolveFeishuAllowlistMatch(params: {
// Feishu allowlists are ID-based; mutable display names must never grant access.
const senderCandidates = [params.senderId, ...(params.senderIds ?? [])]
.map((entry) => normalizeFeishuAllowEntry(String(entry ?? "")))
.map((entry) => normalizeFeishuAllowEntry(entry ?? ""))
.filter(Boolean);
for (const senderId of senderCandidates) {

View File

@@ -276,7 +276,7 @@ function parseFeishuMessageItem(
senderType: item.sender?.sender_type,
content: parseFeishuMessageContent(rawContent, msgType),
contentType: msgType,
createTime: item.create_time ? parseInt(String(item.create_time), 10) : undefined,
createTime: item.create_time ? parseInt(item.create_time, 10) : undefined,
threadId: item.thread_id || undefined,
};
}