From ed4b21c2c7065e93f2bd2144a55528eb8eb9c100 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Tue, 4 Aug 2026 00:38:28 +0300 Subject: [PATCH] websocket cleanup --- src/api/websocket.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/api/websocket.js b/src/api/websocket.js index d952372e5..ae2e5358f 100644 --- a/src/api/websocket.js +++ b/src/api/websocket.js @@ -141,13 +141,11 @@ export const handleMastoWS = ( if (data.result === 'success') { console.debug('[WS] Successfully authenticated') onAuthenticated() + } else if (data.error === 'already_authenticated') { + onAuthenticated() } else { - if (data.error === 'already_authenticated') { - onAuthenticated() - } else { - console.error('[WS] Unable to authenticate:', data.error) - wsEvent.target.close() - } + console.error('[WS] Unable to authenticate:', data.error) + wsEvent.target.close() } } return null