mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-19 07:57:28 +00:00
fix: feishu default account outbound resolution (#32253) (thanks @bmendonca3)
This commit is contained in:
@@ -66,6 +66,26 @@ describe("resolveDefaultFeishuAccountId", () => {
|
||||
});
|
||||
|
||||
describe("resolveFeishuAccount", () => {
|
||||
it("uses top-level credentials with configured default account id even without account map entry", () => {
|
||||
const cfg = {
|
||||
channels: {
|
||||
feishu: {
|
||||
defaultAccount: "router-d",
|
||||
appId: "top_level_app",
|
||||
appSecret: "top_level_secret",
|
||||
accounts: {
|
||||
default: { appId: "cli_default", appSecret: "secret_default" },
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
const account = resolveFeishuAccount({ cfg: cfg as never, accountId: undefined });
|
||||
expect(account.accountId).toBe("router-d");
|
||||
expect(account.configured).toBe(true);
|
||||
expect(account.appId).toBe("top_level_app");
|
||||
});
|
||||
|
||||
it("uses configured default account when accountId is omitted", () => {
|
||||
const cfg = {
|
||||
channels: {
|
||||
|
||||
Reference in New Issue
Block a user