mirror of https://github.com/openclaw/openclaw.git
fix(telegram): guard null persisted update id normalization
This commit is contained in:
parent
c35f529fac
commit
a3db68f9ab
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue