mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-12 07:20:45 +00:00
fix(telegram): handle no-text message in model picker editMessageText (#14397)
Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
This commit is contained in:
@@ -504,7 +504,16 @@ export const registerTelegramHandlers = ({
|
||||
);
|
||||
} catch (editErr) {
|
||||
const errStr = String(editErr);
|
||||
if (!errStr.includes("message is not modified")) {
|
||||
if (errStr.includes("no text in the message")) {
|
||||
try {
|
||||
await bot.api.deleteMessage(callbackMessage.chat.id, callbackMessage.message_id);
|
||||
} catch {}
|
||||
await bot.api.sendMessage(
|
||||
callbackMessage.chat.id,
|
||||
text,
|
||||
keyboard ? { reply_markup: keyboard } : undefined,
|
||||
);
|
||||
} else if (!errStr.includes("message is not modified")) {
|
||||
throw editErr;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user