mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-16 23:52:40 -06:00
89014305f1
Prevent stale top-level buttons arguments from silently sending text-only Telegram messages. Point model guidance and docs to typed presentation actions, and reject retired input before delivery.
9 lines
341 B
TypeScript
9 lines
341 B
TypeScript
export function rejectTelegramNativeButtonParams(params: Record<string, unknown>): void {
|
|
if (params.buttons === undefined) {
|
|
return;
|
|
}
|
|
throw new Error(
|
|
'Telegram native "buttons" is unsupported. Use presentation: {"blocks":[{"type":"buttons","buttons":[{"label":"Yes","action":{"type":"callback","value":"yes"}}]}]}.',
|
|
);
|
|
}
|