From d4e670a3e7279799980609abf5f6edc50f63b53a Mon Sep 17 00:00:00 2001 From: Robert Brennan Date: Tue, 24 Dec 2024 13:08:33 -0500 Subject: [PATCH] fix latest event id (#5789) --- frontend/src/context/ws-client-provider.tsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/frontend/src/context/ws-client-provider.tsx b/frontend/src/context/ws-client-provider.tsx index 954932d1fcad..d08b0cc5e150 100644 --- a/frontend/src/context/ws-client-provider.tsx +++ b/frontend/src/context/ws-client-provider.tsx @@ -79,6 +79,12 @@ export function WsClientProvider({ function handleDisconnect() { setStatus(WsClientProviderStatus.DISCONNECTED); + const sio = sioRef.current; + if (!sio) { + return; + } + sio.io.opts.query = sio.io.opts.query || {}; + sio.io.opts.query.latest_event_id = lastEventRef.current?.id; } function handleError() {