diff --git a/webpack/lib/channel-controller.js b/webpack/lib/channel-controller.js index bbd326c..5a07feb 100644 --- a/webpack/lib/channel-controller.js +++ b/webpack/lib/channel-controller.js @@ -50,7 +50,6 @@ export default class ChannelController{ /* (6) Open channel websocket */ ( window.csock != null ) && csock.close(); window.csock = new wscd(`wss://ws.douscord.xdrm.io/channel/${channel.id}`, { token: auth.token }); - csock.bind(); csock.onreceive = (_dat) => { if( _dat.error !== 0 ) @@ -60,6 +59,7 @@ export default class ChannelController{ csock.onreceive = gs.get.content.manage_update; }; + csock.bind(); /* (6) Log channel */ console.log(`[channel.current] ${channel.link} (${channel.label})`);