mirror of
https://github.com/moltbot/moltbot.git
synced 2026-03-07 22:44:16 +00:00
fix(telegram): guard null persisted update id normalization
This commit is contained in:
@@ -70,6 +70,9 @@ const POLL_WATCHDOG_INTERVAL_MS = 30_000;
|
||||
type TelegramBot = ReturnType<typeof createTelegramBot>;
|
||||
|
||||
function normalizePersistedUpdateId(value: number | null): number | null {
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
if (!Number.isSafeInteger(value) || value < 0) {
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user