websocket cleanup
This commit is contained in:
parent
0a7bfce95b
commit
ed4b21c2c7
1 changed files with 4 additions and 6 deletions
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue