fix: restore Telegram native auto defaults (#66843) (thanks @kashevk0)

* fix(config): restore Telegram native commands under auto defaults

* chore: trigger CI rerun

* test(config): split native auto-default regressions

* fix: restore Telegram native auto defaults (#66843) (thanks @kashevk0)

---------

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
This commit is contained in:
Serhii
2026-04-15 03:16:35 +01:00
committed by GitHub
parent d974ceac21
commit ff4edd0559
3 changed files with 31 additions and 2 deletions

View File

@@ -56,6 +56,17 @@ beforeEach(() => {
},
},
},
{
pluginId: "demo-channel",
source: "test",
plugin: {
...createChannelTestPluginBase({ id: "demo-channel" }),
commands: {
nativeCommandsAutoEnabled: true,
nativeSkillsAutoEnabled: true,
},
},
},
]),
);
});
@@ -104,6 +115,15 @@ describe("resolveNativeSkillsEnabled", () => {
}),
).toBe(false);
});
it("uses the plugin registry for auto defaults even when chat-channel normalization misses", () => {
expect(
resolveNativeSkillsEnabled({
providerId: "demo-channel",
globalSetting: "auto",
}),
).toBe(true);
});
});
describe("resolveNativeCommandsEnabled", () => {
@@ -119,6 +139,15 @@ describe("resolveNativeCommandsEnabled", () => {
);
});
it("uses the plugin registry for auto defaults even when chat-channel normalization misses", () => {
expect(
resolveNativeCommandsEnabled({
providerId: "demo-channel",
globalSetting: "auto",
}),
).toBe(true);
});
it("honors explicit provider/global booleans", () => {
expect(
resolveNativeCommandsEnabled({

View File

@@ -1,6 +1,5 @@
import { getChannelPlugin } from "../channels/plugins/index.js";
import { getChannelPlugin, normalizeChannelId } from "../channels/plugins/index.js";
import type { ChannelId } from "../channels/plugins/types.public.js";
import { normalizeChannelId } from "../channels/registry.js";
import type { NativeCommandsSetting } from "./types.js";
export { isCommandFlagEnabled, isRestartEnabled, type CommandFlagKey } from "./commands.flags.js";