push /code/ state once ready to avoid OT collision

pull/1/head
ansuz 8 years ago
parent bf5dac58dd
commit 2d42cadb23

@ -35,8 +35,7 @@ define([
}; };
$(function () { $(function () {
var userName = Crypto.rand64(8), var toolbar;
toolbar;
var secret = Cryptpad.getSecrets(); var secret = Cryptpad.getSecrets();
@ -129,10 +128,9 @@ define([
var config = { var config = {
//initialState: Messages.codeInitialState, //initialState: Messages.codeInitialState,
userName: userName, initialState: '{}',
websocketURL: Config.websocketURL, websocketURL: Config.websocketURL,
channel: secret.channel, channel: secret.channel,
//cryptKey: key,
crypto: Crypto.createEncryptor(secret.key), crypto: Crypto.createEncryptor(secret.key),
setMyID: setMyID, setMyID: setMyID,
transformFunction: JsonOT.validate transformFunction: JsonOT.validate
@ -549,6 +547,7 @@ define([
initializing = false; initializing = false;
//Cryptpad.log("Your document is ready"); //Cryptpad.log("Your document is ready");
onLocal(); // push local state to avoid parse errors later.
getLastName(function (err, lastName) { getLastName(function (err, lastName) {
if (err) { if (err) {
console.log("Could not get previous name"); console.log("Could not get previous name");

Loading…
Cancel
Save