fix(bot): render custom day/hour/minute pickers as plain text
The day picker text included `(timezone: Asia/Kuala_Lumpur)` and the `_` in the IANA name triggered Markdown's italic delimiter — Telegram's parser then couldn't find the closing `_` and rejected the message with 400 'can't parse entities at byte offset 62'. Drop Markdown formatting for all three custom-time picker views (day, hour, minute) since they include system-generated content (timezones, day labels, dates) that may contain underscores or other markdown chars.
This commit is contained in:
parent
e9f3fd6e29
commit
689891dd87
@ -401,9 +401,11 @@ export function reminderPickDayMenu(timezone: string): MenuView {
|
||||
keyboard.row();
|
||||
}
|
||||
keyboard.text("⬅ Back", "rm_t:back");
|
||||
// Plain text — IANA timezone names contain `_` which Markdown reads as italic.
|
||||
return {
|
||||
text: `📆 *Custom — Step 1 / 3*\n\nPick a day (timezone: ${timezone}):`,
|
||||
text: `📆 Custom — Step 1 / 3\n\nPick a day (timezone: ${timezone}):`,
|
||||
keyboard,
|
||||
parseMode: undefined,
|
||||
};
|
||||
}
|
||||
|
||||
@ -425,8 +427,9 @@ export function reminderPickHourMenu(dayLabel: string, dayOffset: number): MenuV
|
||||
}
|
||||
keyboard.text("⬅ Back", "rm_t:custom");
|
||||
return {
|
||||
text: `📆 *Custom — Step 2 / 3*\n\nDay: ${dayLabel}\n\nPick an hour:`,
|
||||
text: `📆 Custom — Step 2 / 3\n\nDay: ${dayLabel}\n\nPick an hour:`,
|
||||
keyboard,
|
||||
parseMode: undefined,
|
||||
};
|
||||
}
|
||||
|
||||
@ -448,10 +451,11 @@ export function reminderPickMinuteMenu(
|
||||
keyboard.text("⬅ Back", `rmd:${dayOffset}`);
|
||||
return {
|
||||
text:
|
||||
`📆 *Custom — Step 3 / 3*\n\n` +
|
||||
`📆 Custom — Step 3 / 3\n\n` +
|
||||
`Day: ${dayLabel}\nHour: ${String(hour).padStart(2, "0")}:00\n\n` +
|
||||
`Pick minutes:`,
|
||||
keyboard,
|
||||
parseMode: undefined,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user