openclaw/extensions/telegram
chi 33e6a6724d
fix(telegram): enable HTML formatting for model switch messages (#60042)
* fix(telegram): enable HTML formatting for model switch messages

The model switch confirmation message was displaying raw Markdown
(**text**) instead of bold formatting because parse_mode was not set.

Changes:
- Add optional extra parameter to editMessageWithButtons for parse_mode
- Change format from Markdown ** to HTML <b> tags
- Pass parse_mode: 'HTML' when editing model switch message

Fixes the issue where model names appeared as **provider/model**
instead of bold text in Telegram.

* fix(telegram): escape HTML entities in model switch confirmation

Add defensive `escapeHtml` helper to sanitize `selection.provider`
and `selection.model` before interpolating them into the HTML
callback message. This prevents potential API rejection (HTTP 400)
if future provider or model names contain `<`, `>`, or `&`.

Addresses review feedback on unescaped HTML interpolation.

* test(telegram): cover HTML model switch confirmation

---------

Co-authored-by: Frank Yang <frank.ekn@gmail.com>
2026-04-04 00:05:09 +08:00
..
src fix(telegram): enable HTML formatting for model switch messages (#60042) 2026-04-04 00:05:09 +08:00
allow-from.ts perf: split telegram audit runtime seams 2026-03-22 00:53:12 +00:00
api.ts refactor: route more test seams through public plugin APIs 2026-03-27 13:46:17 +00:00
channel-config-api.ts refactor: move channel config metadata into plugin-owned manifests 2026-03-27 01:59:30 +00:00
index.ts refactor: clean extension api boundaries 2026-03-17 09:38:21 -07:00
openclaw.plugin.json
package.json build: prepare 2026.4.1-beta.1 release 2026-04-01 15:09:19 +01:00
runtime-api.ts refactor(plugin-sdk): remove channel-specific sdk seams 2026-04-03 10:45:10 +01:00
session-key-api.ts Fix: move bootstrap session grammar into plugin-owned session-key surfaces (#58400) 2026-03-31 19:41:01 -04:00
setup-entry.ts refactor: clean extension api boundaries 2026-03-17 09:38:21 -07:00
test-api.ts Extensions: stabilize telegram registry contracts 2026-03-29 21:42:58 -04:00
test-support.ts refactor(plugin-sdk): remove channel-specific sdk seams 2026-04-03 10:45:10 +01:00
update-offset-runtime-api.ts refactor: remove remaining core extension reach-ins 2026-03-27 13:46:16 +00:00