fix(telegram): set richMessages default to false explicitly in schema… · openclaw/openclaw@4929cbd
Monkey-wusky
·
2026-06-19
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -166,6 +166,19 @@ describe("telegram custom commands schema", () => {
|
166 | 166 | } |
167 | 167 | }); |
168 | 168 | |
| 169 | +it("preserves rich message inheritance for account overrides", () => { |
| 170 | +const res = TelegramConfigSchema.safeParse({ |
| 171 | +richMessages: true, |
| 172 | +accounts: { ops: {} }, |
| 173 | +}); |
| 174 | + |
| 175 | +expect(res.success).toBe(true); |
| 176 | +if (res.success) { |
| 177 | +expect(res.data.richMessages).toBe(true); |
| 178 | +expect(res.data.accounts?.ops?.richMessages).toBeUndefined(); |
| 179 | +} |
| 180 | +}); |
| 181 | + |
169 | 182 | it("normalizes custom commands", () => { |
170 | 183 | const res = TelegramConfigSchema.safeParse({ |
171 | 184 | customCommands: [{ command: "/Backup", description: " Git backup " }], |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -167,7 +167,11 @@ export type TelegramAccountConfig = {
|
167 | 167 | textChunkLimit?: number; |
168 | 168 | /** |
169 | 169 | * Use Telegram Bot API 10.1 rich messages for text sends and edits. |
170 | | - * Default: false until Telegram clients render rich messages consistently. |
| 170 | + * When false (default), falls back to HTML/plain text formatting via sendMessage. |
| 171 | + * Set to true to enable native tables, details, and rich media via sendRichMessage. |
| 172 | + * Note: Some Telegram clients (Web, Desktop, older mobile) do NOT support |
| 173 | + * sendRichMessage and will show "This message is not supported" errors. |
| 174 | + * Default: false. |
171 | 175 | */ |
172 | 176 | richMessages?: boolean; |
173 | 177 | /** Streaming + chunking settings. Prefer this nested shape over legacy flat keys. */ |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。