mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 17:54:32 +00:00
fix: align draft/outbound typings and tests
This commit is contained in:
@@ -160,7 +160,7 @@ export function resolveOutboundTarget(params: {
|
||||
};
|
||||
}
|
||||
|
||||
const allowFrom =
|
||||
const allowFromRaw =
|
||||
params.allowFrom ??
|
||||
(params.cfg && plugin.config.resolveAllowFrom
|
||||
? plugin.config.resolveAllowFrom({
|
||||
@@ -168,6 +168,7 @@ export function resolveOutboundTarget(params: {
|
||||
accountId: params.accountId ?? undefined,
|
||||
})
|
||||
: undefined);
|
||||
const allowFrom = allowFromRaw?.map((entry) => String(entry));
|
||||
|
||||
// Fall back to per-channel defaultTo when no explicit target is provided.
|
||||
const effectiveTo =
|
||||
@@ -360,12 +361,13 @@ export function resolveHeartbeatSenderContext(params: {
|
||||
const accountId =
|
||||
params.delivery.accountId ??
|
||||
(provider === params.delivery.lastChannel ? params.delivery.lastAccountId : undefined);
|
||||
const allowFrom = provider
|
||||
const allowFromRaw = provider
|
||||
? (getChannelPlugin(provider)?.config.resolveAllowFrom?.({
|
||||
cfg: params.cfg,
|
||||
accountId,
|
||||
}) ?? [])
|
||||
: [];
|
||||
const allowFrom = allowFromRaw.map((entry) => String(entry));
|
||||
|
||||
const sender = resolveHeartbeatSenderId({
|
||||
allowFrom,
|
||||
|
||||
Reference in New Issue
Block a user