From 2f5894c4599165e3c506318542332f2e810b0aea Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Tue, 3 Apr 2018 20:26:55 +0200 Subject: [PATCH] [lib.channel-controller] fix { rid: } first message after auth --- webpack/lib/channel-controller.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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})`);