mirror of https://github.com/openclaw/openclaw.git
fix: preserve channel status account ids
This commit is contained in:
parent
eb6698002c
commit
1c5a4d01c9
|
|
@ -14,13 +14,19 @@ async function buildSnapshotFromAccount<ResolvedAccount>(params: {
|
|||
audit?: unknown;
|
||||
}): Promise<ChannelAccountSnapshot> {
|
||||
if (params.plugin.status?.buildAccountSnapshot) {
|
||||
return await params.plugin.status.buildAccountSnapshot({
|
||||
const snapshot = await params.plugin.status.buildAccountSnapshot({
|
||||
account: params.account,
|
||||
cfg: params.cfg,
|
||||
runtime: params.runtime,
|
||||
probe: params.probe,
|
||||
audit: params.audit,
|
||||
});
|
||||
return typeof snapshot.accountId === "string" && snapshot.accountId.trim().length > 0
|
||||
? snapshot
|
||||
: {
|
||||
accountId: params.accountId,
|
||||
...snapshot,
|
||||
};
|
||||
}
|
||||
const enabled = params.plugin.config.isEnabled
|
||||
? params.plugin.config.isEnabled(params.account, params.cfg)
|
||||
|
|
|
|||
|
|
@ -178,6 +178,7 @@ describe("config-only channels status output", () => {
|
|||
|
||||
const joined = await formatLocalStatusSummary({ channels: {} });
|
||||
expect(joined).toContain("TokenOnly");
|
||||
expect(joined).toContain("TokenOnly primary");
|
||||
expect(joined).toContain("configured, secret unavailable in this command path");
|
||||
expect(joined).toContain("token:config (unavailable)");
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue