Set the url if there is none

This commit is contained in:
Caleb James DeLisle
2017-08-11 10:40:57 +02:00
parent 33e73dd5e5
commit 4acd9957a9
4 changed files with 15 additions and 7 deletions

View File

@@ -29,6 +29,7 @@ define([], function () {
var readOnly = conf.readOnly || false;
var network = conf.network;
var sframeChan = conf.sframeChan;
var onConnect = conf.onConnect || function () { };
conf = undefined;
var initializing = true;
@@ -40,7 +41,7 @@ define([], function () {
messageFromInner(message, cb);
});
var onReady = function () {
var onReady = function (wc) {
// Trigger onReady only if not ready yet. This is important because the history keeper sends a direct
// message through "network" when it is synced, and it triggers onReady for each channel joined.
if (!initializing) { return; }
@@ -131,6 +132,9 @@ define([], function () {
wcObject.wc = wc;
channel = wc.id;
onConnect(wc);
onConnect = function () { };
// Add the existing peers in the userList
sframeChan.event('EV_RT_CONNECT', { myID: wc.myID, members: wc.members, readOnly: readOnly });