mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-25 16:12:13 +00:00
fix: preserve telegram default auth promotion
This commit is contained in:
@@ -53,7 +53,7 @@ Docs: https://docs.openclaw.ai
|
||||
- Slack/thread mentions: add `channels.slack.thread.requireExplicitMention` so Slack channels that already require mentions can also require explicit `@bot` mentions inside bot-participated threads. (#58276) Thanks @praktika-engineer.
|
||||
- UI/light mode: target both root and nested WebKit scrollbar thumbs in the light theme so page-level and container scrollbars stay visible on light backgrounds. (#61753) Thanks @chziyue.
|
||||
- Matrix/onboarding: add an invite auto-join setup step with explicit off warnings and strict stable-target validation so new Matrix accounts stop silently ignoring invited rooms and fresh DM-style invites unless operators opt in. (#62168) Thanks @gumadeiras.
|
||||
- Telegram/doctor: stop moving top-level access-control fallback into `accounts.default` during multi-account doctor normalization, so existing named bots keep their inherited allowlist and policy config. (#62263) Thanks @obviyus.
|
||||
- Telegram/doctor: keep top-level access-control fallback in place during multi-account normalization while still promoting legacy default auth into `accounts.default`, so existing named bots keep inherited allowlists without dropping the legacy default bot. (#62263) Thanks @obviyus.
|
||||
|
||||
## 2026.4.5
|
||||
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
export const singleAccountKeysToMove = ["streaming"];
|
||||
export const namedAccountPromotionKeys: string[] = [];
|
||||
export const namedAccountPromotionKeys = ["botToken", "tokenFile"] as const;
|
||||
|
||||
@@ -383,6 +383,43 @@ describe("normalizeCompatibilityConfigValues", () => {
|
||||
);
|
||||
});
|
||||
|
||||
it("keeps Telegram policy fallback top-level while still seeding default auth", () => {
|
||||
const res = normalizeCompatibilityConfigValues({
|
||||
channels: {
|
||||
telegram: {
|
||||
enabled: true,
|
||||
botToken: "legacy-token",
|
||||
dmPolicy: "allowlist",
|
||||
allowFrom: ["123"],
|
||||
groupPolicy: "allowlist",
|
||||
accounts: {
|
||||
bot1: {
|
||||
enabled: true,
|
||||
botToken: "bot-1-token",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
expect(res.config.channels?.telegram?.accounts?.default).toMatchObject({
|
||||
botToken: "legacy-token",
|
||||
});
|
||||
expect(res.config.channels?.telegram?.botToken).toBeUndefined();
|
||||
expect(res.config.channels?.telegram?.dmPolicy).toBe("allowlist");
|
||||
expect(res.config.channels?.telegram?.allowFrom).toEqual(["123"]);
|
||||
expect(res.config.channels?.telegram?.groupPolicy).toBe("allowlist");
|
||||
expect(mergeTelegramAccountConfig(res.config, "default")).toMatchObject({
|
||||
botToken: "legacy-token",
|
||||
dmPolicy: "allowlist",
|
||||
allowFrom: ["123"],
|
||||
groupPolicy: "allowlist",
|
||||
});
|
||||
expect(res.changes).toContain(
|
||||
"Moved channels.telegram single-account top-level values into channels.telegram.accounts.default.",
|
||||
);
|
||||
});
|
||||
|
||||
it("migrates browser ssrfPolicy allowPrivateNetwork to dangerouslyAllowPrivateNetwork", () => {
|
||||
const res = normalizeCompatibilityConfigValues({
|
||||
browser: {
|
||||
|
||||
Reference in New Issue
Block a user