[lib.channel-controller] fix { rid: } first message after auth

This commit is contained in:
xdrm-brackets 2018-04-03 20:26:55 +02:00
parent 225eef262e
commit 2f5894c459
1 changed files with 1 additions and 1 deletions

View File

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