UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

2 lines • 1.15 kB
//!src/channels/account-resolution.ts async function resolveChannelAccount(e){const{config:t}=e.plugin;return t.resolveAccountAsync?await t.resolveAccountAsync(e.cfg,e.accountId):t.resolveAccount(e.cfg,e.accountId)}async function channelHasConfiguredState(e){const{config:t}=e.plugin;const n={cfg:e.cfg,env:e.env};return t.hasConfiguredStateAsync?await t.hasConfiguredStateAsync(n):t.hasConfiguredState?.(n)}async function resolveChannelAllowFrom(e){const{config:t}=e.plugin;const n={cfg:e.cfg,accountId:e.accountId};return t.resolveAllowFromAsync?await t.resolveAllowFromAsync(n):t.resolveAllowFrom?.(n)}async function describeChannelAccount(e){const{config:t}=e.plugin;return t.describeAccountAsync?await t.describeAccountAsync(e.account,e.cfg):t.describeAccount?.(e.account,e.cfg)}async function resolvePluginDmPolicy(e){const{security:t}=e.plugin;const n={cfg:e.cfg,accountId:e.accountId,account:e.account};return t?.resolveDmPolicyAsync?await t.resolveDmPolicyAsync(n):t?.resolveDmPolicy?.(n)}export{resolvePluginDmPolicy as a,resolveChannelAllowFrom as i,describeChannelAccount as n,resolveChannelAccount as r,channelHasConfiguredState as t};