supress websocket connecting errors

This commit is contained in:
Mystikfluu 2022-08-23 00:41:26 +02:00
parent c33ff903f7
commit 0e1226c5be

View File

@ -379,7 +379,6 @@ document.addEventListener("visibilitychange", function() {
function switchChannel(channelname) {
sessionStorage.setItem("lastdm", channelname);
currentChannel = channelname
socket.send(JSON.stringify({"id":"switchChannel","data":channelname}))
if(localStorage.getItem(currentChannel+"enc_key")!=null) {
encryption_keys = localStorage.getItem(currentChannel+"enc_key")
@ -387,6 +386,12 @@ function switchChannel(channelname) {
} else {
encryption_keys = ""
}
try {
socket.send(JSON.stringify({"id":"switchChannel","data":channelname}))
} catch(err) {
console.error(err)
}
}
function removeDuplicates(a) {