why the fuck is there a json string nested in the json

This commit is contained in:
josephsmendoza
2023-07-20 16:17:38 -07:00
parent dd94e42851
commit fd41eead59
+2 -2
View File
@@ -206,7 +206,7 @@ function init_pubsub(){
break break
} }
case 'MESSAGE':{ case 'MESSAGE':{
message=message.data.message message=JSON.parse(message.data.message)
if('sub_plan' in message){ if('sub_plan' in message){
handle_event('sub'+message.sub_plan) handle_event('sub'+message.sub_plan)
break break
@@ -325,7 +325,7 @@ async function init_irc(){
ircSend('JOIN #'+tokens.login) ircSend('JOIN #'+tokens.login)
} }
irc.onmessage=function(event){ irc.onmessage=function(event){
console.log(event) console.debug(event)
for(let data of event.data.split('\r\n')){ for(let data of event.data.split('\r\n')){
console.debug('> '+data) console.debug('> '+data)
/** @type string */ /** @type string */