diff --git a/www/code/main.js b/www/code/main.js index f7ae95cb9..2d12a8d06 100644 --- a/www/code/main.js +++ b/www/code/main.js @@ -213,7 +213,8 @@ define([ } myUserName = myUserNameTemp; myData[myID] = { - name: myUserName + name: myUserName, + uid: Cryptpad.getUid(), }; addToUserData(myData); Cryptpad.setAttribute('username', myUserName, function (err, data) { @@ -592,7 +593,8 @@ define([ setName(lastName); } else { myData[myID] = { - name: "" + name: "", + uid: Cryptpad.getUid(), }; addToUserData(myData); onLocal(); diff --git a/www/pad/main.js b/www/pad/main.js index 9d997aa7d..eb2ce8210 100644 --- a/www/pad/main.js +++ b/www/pad/main.js @@ -310,7 +310,8 @@ define([ } myUserName = myUserNameTemp; myData[myID] = { - name: myUserName + name: myUserName, + uid: Cryptpad.getUid(), }; addToUserData(myData); Cryptpad.setAttribute('username', newName, function (err, data) { @@ -713,7 +714,8 @@ define([ setName(lastName); } else { myData[myID] = { - name: "" + name: "", + uid: Cryptpad.getUid() }; addToUserData(myData); realtimeOptions.onLocal(); @@ -724,7 +726,7 @@ define([ if (newPad) { cursor.setToEnd(); } else { - cursor.setToFix(); + cursor.setToStart(); } }); }; diff --git a/www/poll/main.js b/www/poll/main.js index 10d441f08..a3bef9a9b 100644 --- a/www/poll/main.js +++ b/www/poll/main.js @@ -448,7 +448,8 @@ define([ var myID = APP.myID; var myData = {}; myData[myID] = { - name: myUserName + name: myUserName, + uid: Cryptpad.getUid(), }; addToUserData(myData); Cryptpad.setAttribute('username', newName, function (err, data) { @@ -652,7 +653,8 @@ define([ } else { var myData = {}; myData[info.myId] = { - name: "" + name: "", + uid: Cryptpad.getUid(), }; addToUserData(myData); APP.$userNameButton.click(); diff --git a/www/slide/main.js b/www/slide/main.js index 949260f72..b5c3d8e07 100644 --- a/www/slide/main.js +++ b/www/slide/main.js @@ -268,7 +268,8 @@ define([ } myUserName = myUserNameTemp; myData[myID] = { - name: myUserName + name: myUserName, + uid: Cryptpad.getUid(), }; addToUserData(myData); Cryptpad.setAttribute('username', myUserName, function (err, data) { @@ -783,7 +784,8 @@ define([ setName(lastName); } else { myData[myID] = { - name: "" + name: "", + uid: Cryptpad.getUid(), }; addToUserData(myData); onLocal();