mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-26 09:21:55 +00:00
refactor: share scoped account accessor adapters
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
import { formatAllowFromLowercase } from "openclaw/plugin-sdk/allow-from";
|
||||
import { createMessageToolCardSchema } from "openclaw/plugin-sdk/channel-actions";
|
||||
import { createHybridChannelConfigAdapter } from "openclaw/plugin-sdk/channel-config-helpers";
|
||||
import {
|
||||
adaptScopedAccountAccessor,
|
||||
createHybridChannelConfigAdapter,
|
||||
} from "openclaw/plugin-sdk/channel-config-helpers";
|
||||
import type {
|
||||
ChannelMessageActionAdapter,
|
||||
ChannelMessageToolDiscovery,
|
||||
@@ -164,7 +167,7 @@ const feishuConfigAdapter = createHybridChannelConfigAdapter<
|
||||
>({
|
||||
sectionKey: "feishu",
|
||||
listAccountIds: listFeishuAccountIds,
|
||||
resolveAccount: (cfg, accountId) => resolveFeishuAccount({ cfg, accountId }),
|
||||
resolveAccount: adaptScopedAccountAccessor(resolveFeishuAccount),
|
||||
defaultAccountId: resolveDefaultFeishuAccountId,
|
||||
clearBaseFields: [],
|
||||
resolveAllowFrom: (account) => account.config.allowFrom,
|
||||
|
||||
Reference in New Issue
Block a user