mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-22 22:52:03 +00:00
refactor: simplify channel setup conversions
This commit is contained in:
@@ -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: {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user