feat(config): 渲染默认 rich(用户要求 2026-09-14)
Config.rendering 默认 'html'→'rich';显式 'html'/'compat' 仍可强制兼容模式。 profile cordis.patch.yml 的 rendering 同步改为 rich(patch 会覆盖插件默认值, 两处都改才生效)。旧客户端显示'不支持'时用 /rich off 按聊天切回。
This commit is contained in:
Vendored
+2
-2
@@ -9,8 +9,8 @@ export interface TelegramChannelConfig {
|
|||||||
allowAllUsers?: boolean;
|
allowAllUsers?: boolean;
|
||||||
maxMessageLength?: number;
|
maxMessageLength?: number;
|
||||||
pollingTimeoutSec?: number;
|
pollingTimeoutSec?: number;
|
||||||
/** 'rich' = Telegram native Rich Messages (needs a recent client);
|
/** 默认 'rich' = Telegram native Rich Messages(需较新客户端);
|
||||||
* anything else (default) = HTML compatibility mode that renders on all clients. */
|
* 显式 'html'/'compat' 等其它值 = 兼容模式,所有客户端可显示。 */
|
||||||
rendering?: string;
|
rendering?: string;
|
||||||
}
|
}
|
||||||
export declare const Config: Schema<TelegramChannelConfig>;
|
export declare const Config: Schema<TelegramChannelConfig>;
|
||||||
|
|||||||
+1
-1
@@ -9,7 +9,7 @@ export const Config = Schema.object({
|
|||||||
allowAllUsers: Schema.boolean().default(false),
|
allowAllUsers: Schema.boolean().default(false),
|
||||||
maxMessageLength: Schema.number().default(4096),
|
maxMessageLength: Schema.number().default(4096),
|
||||||
pollingTimeoutSec: Schema.number().default(30),
|
pollingTimeoutSec: Schema.number().default(30),
|
||||||
rendering: Schema.string().default('html'),
|
rendering: Schema.string().default('rich'),
|
||||||
});
|
});
|
||||||
function resolveAllowedUserIds(config) {
|
function resolveAllowedUserIds(config) {
|
||||||
if (config.allowedUserIds && config.allowedUserIds.length > 0) {
|
if (config.allowedUserIds && config.allowedUserIds.length > 0) {
|
||||||
|
|||||||
+3
-3
@@ -12,8 +12,8 @@ export interface TelegramChannelConfig {
|
|||||||
allowAllUsers?: boolean
|
allowAllUsers?: boolean
|
||||||
maxMessageLength?: number
|
maxMessageLength?: number
|
||||||
pollingTimeoutSec?: number
|
pollingTimeoutSec?: number
|
||||||
/** 'rich' = Telegram native Rich Messages (needs a recent client);
|
/** 默认 'rich' = Telegram native Rich Messages(需较新客户端);
|
||||||
* anything else (default) = HTML compatibility mode that renders on all clients. */
|
* 显式 'html'/'compat' 等其它值 = 兼容模式,所有客户端可显示。 */
|
||||||
rendering?: string
|
rendering?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -23,7 +23,7 @@ export const Config: Schema<TelegramChannelConfig> = Schema.object({
|
|||||||
allowAllUsers: Schema.boolean().default(false),
|
allowAllUsers: Schema.boolean().default(false),
|
||||||
maxMessageLength: Schema.number().default(4096),
|
maxMessageLength: Schema.number().default(4096),
|
||||||
pollingTimeoutSec: Schema.number().default(30),
|
pollingTimeoutSec: Schema.number().default(30),
|
||||||
rendering: Schema.string().default('html'),
|
rendering: Schema.string().default('rich'),
|
||||||
})
|
})
|
||||||
|
|
||||||
function resolveAllowedUserIds(config: TelegramChannelConfig): number[] {
|
function resolveAllowedUserIds(config: TelegramChannelConfig): number[] {
|
||||||
|
|||||||
Reference in New Issue
Block a user