From a20b2e781f31501fc5535972aa0cbbc74636e28c Mon Sep 17 00:00:00 2001 From: shivanagendrak Date: Wed, 28 Jan 2026 22:04:01 -0700 Subject: [PATCH] fix(config): write enabled state to channels config for built-in channels --- src/config/plugin-auto-enable.ts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/config/plugin-auto-enable.ts b/src/config/plugin-auto-enable.ts index a7632e41f..85aba2867 100644 --- a/src/config/plugin-auto-enable.ts +++ b/src/config/plugin-auto-enable.ts @@ -3,6 +3,7 @@ import { getChatChannelMeta, listChatChannels, normalizeChatChannelId, + CHAT_CHANNEL_ORDER, } from "../channels/registry.js"; import { getChannelPluginCatalogEntry, @@ -318,6 +319,23 @@ function ensureAllowlisted(cfg: MoltbotConfig, pluginId: string): MoltbotConfig } function enablePluginEntry(cfg: MoltbotConfig, pluginId: string): MoltbotConfig { + // If this is a built-in channel, enable it in config.channels instead of config.plugins + if (CHAT_CHANNEL_ORDER.includes(pluginId as any)) { + const channels = cfg.channels as Record> | undefined; + const channelConfig = channels?.[pluginId] || {}; + + return { + ...cfg, + channels: { + ...channels, + [pluginId]: { + ...channelConfig, + enabled: true, + }, + }, + }; + } + const entries = { ...cfg.plugins?.entries, [pluginId]: {