mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-10 08:41:13 +00:00
fix: honor imessage setup default account
This commit is contained in:
@@ -29,7 +29,7 @@ export const imessageSetupWizard: ChannelSetupWizard = {
|
||||
unconfiguredScore: imessageSetupStatusBase.unconfiguredScore,
|
||||
resolveConfigured: imessageSetupStatusBase.resolveConfigured,
|
||||
resolveBinaryPath: ({ cfg, accountId }) =>
|
||||
resolveIMessageAccount({ cfg, accountId: accountId ?? "default" }).config.cliPath ?? "imsg",
|
||||
resolveIMessageAccount({ cfg, accountId }).config.cliPath ?? "imsg",
|
||||
detectBinary,
|
||||
}),
|
||||
credentials: [],
|
||||
|
||||
@@ -292,6 +292,27 @@ describe("imessage setup status", () => {
|
||||
expect(result.configured).toBe(false);
|
||||
expect(result.statusLines).toContain("iMessage: needs setup");
|
||||
});
|
||||
|
||||
it("uses configured defaultAccount for omitted setup status cliPath", async () => {
|
||||
const status = await getIMessageSetupStatus({
|
||||
cfg: {
|
||||
channels: {
|
||||
imessage: {
|
||||
cliPath: "/tmp/root-imsg",
|
||||
defaultAccount: "work",
|
||||
accounts: {
|
||||
work: {
|
||||
cliPath: "/tmp/work-imsg",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
} as never,
|
||||
accountOverrides: {},
|
||||
});
|
||||
|
||||
expect(status.statusLines).toContain("imsg: missing (/tmp/work-imsg)");
|
||||
});
|
||||
});
|
||||
|
||||
describe("probeIMessage", () => {
|
||||
|
||||
Reference in New Issue
Block a user