This repository has been archived on 2026-08-07. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
openclaw/npm/projects/openclaw-feishu-dc69f44688/node_modules/@openclaw/feishu/dist/session-conversation-CZSMgac-.js
T

28 lines
1.0 KiB
JavaScript

import { r as parseFeishuConversationId, t as buildFeishuConversationId } from "./conversation-id-DuL575sn.js";
//#region extensions/feishu/src/session-conversation.ts
function resolveFeishuParentConversationCandidates(rawId) {
const parsed = parseFeishuConversationId({ conversationId: rawId });
if (!parsed) return [];
switch (parsed.scope) {
case "group_topic_sender": return [buildFeishuConversationId({
chatId: parsed.chatId,
scope: "group_topic",
topicId: parsed.topicId
}), parsed.chatId];
case "group_topic":
case "group_sender": return [parsed.chatId];
default: return [];
}
}
function resolveFeishuSessionConversation(params) {
const parsed = parseFeishuConversationId({ conversationId: params.rawId });
if (!parsed) return null;
return {
id: parsed.canonicalConversationId,
baseConversationId: parsed.chatId,
parentConversationCandidates: resolveFeishuParentConversationCandidates(parsed.canonicalConversationId)
};
}
//#endregion
export { resolveFeishuSessionConversation as t };