From 4039dec03cbf2050c093a4ad2b730c23c7af7688 Mon Sep 17 00:00:00 2001 From: dsh-agent Date: Wed, 16 Sep 2026 10:42:45 +0800 Subject: [PATCH] =?UTF-8?q?feat(config):=20=E6=B8=B2=E6=9F=93=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=20rich=EF=BC=88=E7=94=A8=E6=88=B7=E8=A6=81=E6=B1=82?= =?UTF-8?q?=202026-09-14=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Config.rendering 默认 'html'→'rich';显式 'html'/'compat' 仍可强制兼容模式。 profile cordis.patch.yml 的 rendering 同步改为 rich(patch 会覆盖插件默认值, 两处都改才生效)。旧客户端显示'不支持'时用 /rich off 按聊天切回。 --- lib/index.d.ts | 4 ++-- lib/index.js | 2 +- src/index.ts | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/index.d.ts b/lib/index.d.ts index d8b8769..f3476bd 100644 --- a/lib/index.d.ts +++ b/lib/index.d.ts @@ -9,8 +9,8 @@ export interface TelegramChannelConfig { allowAllUsers?: boolean; maxMessageLength?: number; pollingTimeoutSec?: number; - /** 'rich' = Telegram native Rich Messages (needs a recent client); - * anything else (default) = HTML compatibility mode that renders on all clients. */ + /** 默认 'rich' = Telegram native Rich Messages(需较新客户端); + * 显式 'html'/'compat' 等其它值 = 兼容模式,所有客户端可显示。 */ rendering?: string; } export declare const Config: Schema; diff --git a/lib/index.js b/lib/index.js index cc2d308..80d798c 100644 --- a/lib/index.js +++ b/lib/index.js @@ -9,7 +9,7 @@ export const Config = Schema.object({ allowAllUsers: Schema.boolean().default(false), maxMessageLength: Schema.number().default(4096), pollingTimeoutSec: Schema.number().default(30), - rendering: Schema.string().default('html'), + rendering: Schema.string().default('rich'), }); function resolveAllowedUserIds(config) { if (config.allowedUserIds && config.allowedUserIds.length > 0) { diff --git a/src/index.ts b/src/index.ts index cb48213..89312e3 100644 --- a/src/index.ts +++ b/src/index.ts @@ -12,8 +12,8 @@ export interface TelegramChannelConfig { allowAllUsers?: boolean maxMessageLength?: number pollingTimeoutSec?: number - /** 'rich' = Telegram native Rich Messages (needs a recent client); - * anything else (default) = HTML compatibility mode that renders on all clients. */ + /** 默认 'rich' = Telegram native Rich Messages(需较新客户端); + * 显式 'html'/'compat' 等其它值 = 兼容模式,所有客户端可显示。 */ rendering?: string } @@ -23,7 +23,7 @@ export const Config: Schema = Schema.object({ allowAllUsers: Schema.boolean().default(false), maxMessageLength: Schema.number().default(4096), pollingTimeoutSec: Schema.number().default(30), - rendering: Schema.string().default('html'), + rendering: Schema.string().default('rich'), }) function resolveAllowedUserIds(config: TelegramChannelConfig): number[] {