From 5f4825f3a05f026634bb84afb260ebb6bcfe1d7f Mon Sep 17 00:00:00 2001 From: ansuz Date: Thu, 21 Apr 2016 19:03:50 +0200 Subject: [PATCH] don't change the hash from realtime input let applications handle that logic --- www/common/realtime-input.js | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/www/common/realtime-input.js b/www/common/realtime-input.js index ed982580e..7e818f8ae 100644 --- a/www/common/realtime-input.js +++ b/www/common/realtime-input.js @@ -101,14 +101,6 @@ define([ }; var onReady = function(wc, network) { - if(config.onInit) { - config.onInit({ - myID: wc.myID, - realtime: realtime, - getLag: network.getLag, - userList: userList - }); - } // Trigger onJoining with our own Cryptpad username to tell the toolbar that we are synced onJoining(wc.myID); @@ -206,7 +198,6 @@ define([ var onOpen = function(wc, network) { channel = wc.id; - window.location.hash = channel + chanKey; // Add the existing peers in the userList wc.members.forEach(onJoining); @@ -218,7 +209,6 @@ define([ wc.on('join', onJoining); wc.on('leave', onLeaving); - if(config.setMyID) { config.setMyID({ myID: wc.myID @@ -227,6 +217,18 @@ define([ // Open a Chainpad session realtime = createRealtime(); + if(config.onInit) { + config.onInit({ + myID: wc.myID, + realtime: realtime, + getLag: network.getLag, + userList: userList, + + // channel + channel: channel, + }); + } + // Sending a message... realtime.onMessage(function(message) { // Filter messages sent by Chainpad to make it compatible with Netflux