websocket cleanup

This commit is contained in:
Henry Jameson 2026-08-04 00:38:28 +03:00
commit ed4b21c2c7

View file

@ -141,13 +141,11 @@ export const handleMastoWS = (
if (data.result === 'success') { if (data.result === 'success') {
console.debug('[WS] Successfully authenticated') console.debug('[WS] Successfully authenticated')
onAuthenticated() onAuthenticated()
} else if (data.error === 'already_authenticated') {
onAuthenticated()
} else { } else {
if (data.error === 'already_authenticated') { console.error('[WS] Unable to authenticate:', data.error)
onAuthenticated() wsEvent.target.close()
} else {
console.error('[WS] Unable to authenticate:', data.error)
wsEvent.target.close()
}
} }
} }
return null return null