From 7b934cd82803a06603f7d06a4f98ae49dbcdd442 Mon Sep 17 00:00:00 2001 From: "gpt-engineer-app[bot]" <159125892+gpt-engineer-app[bot]@users.noreply.github.com> Date: Fri, 24 Apr 2026 20:51:08 +0000 Subject: [PATCH] Changes Co-authored-by: renee-png <262607627+renee-png@users.noreply.github.com> --- src/routes/hooks/poll-imap.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/routes/hooks/poll-imap.ts b/src/routes/hooks/poll-imap.ts index 664a95d..e68788f 100644 --- a/src/routes/hooks/poll-imap.ts +++ b/src/routes/hooks/poll-imap.ts @@ -58,13 +58,13 @@ export const Route = createFileRoute("/hooks/poll-imap")({ // First pass: collect just UIDs via search (no FETCH stream). // This avoids any large per-message data crossing the socket // before we know which messages to skip. - const uidList = await client.search( + const uidList = (await (client as any).search( { uid: range }, { uid: true }, - ); + )) as number[] | undefined; const candidateUids = (uidList ?? []) - .filter((u) => u > (settings.last_uid ?? 0)) - .sort((a, b) => a - b) + .filter((u: number) => u > (settings.last_uid ?? 0)) + .sort((a: number, b: number) => a - b) .slice(0, MAX_MESSAGES_PER_RUN * 4); for (const uid of candidateUids) {