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[] {