add uid to userdata for better notifications

pull/1/head
ansuz 8 years ago
parent fa9249ef29
commit 912215185f

@ -213,7 +213,8 @@ define([
} }
myUserName = myUserNameTemp; myUserName = myUserNameTemp;
myData[myID] = { myData[myID] = {
name: myUserName name: myUserName,
uid: Cryptpad.getUid(),
}; };
addToUserData(myData); addToUserData(myData);
Cryptpad.setAttribute('username', myUserName, function (err, data) { Cryptpad.setAttribute('username', myUserName, function (err, data) {
@ -592,7 +593,8 @@ define([
setName(lastName); setName(lastName);
} else { } else {
myData[myID] = { myData[myID] = {
name: "" name: "",
uid: Cryptpad.getUid(),
}; };
addToUserData(myData); addToUserData(myData);
onLocal(); onLocal();

@ -310,7 +310,8 @@ define([
} }
myUserName = myUserNameTemp; myUserName = myUserNameTemp;
myData[myID] = { myData[myID] = {
name: myUserName name: myUserName,
uid: Cryptpad.getUid(),
}; };
addToUserData(myData); addToUserData(myData);
Cryptpad.setAttribute('username', newName, function (err, data) { Cryptpad.setAttribute('username', newName, function (err, data) {
@ -713,7 +714,8 @@ define([
setName(lastName); setName(lastName);
} else { } else {
myData[myID] = { myData[myID] = {
name: "" name: "",
uid: Cryptpad.getUid()
}; };
addToUserData(myData); addToUserData(myData);
realtimeOptions.onLocal(); realtimeOptions.onLocal();
@ -724,7 +726,7 @@ define([
if (newPad) { if (newPad) {
cursor.setToEnd(); cursor.setToEnd();
} else { } else {
cursor.setToFix(); cursor.setToStart();
} }
}); });
}; };

@ -448,7 +448,8 @@ define([
var myID = APP.myID; var myID = APP.myID;
var myData = {}; var myData = {};
myData[myID] = { myData[myID] = {
name: myUserName name: myUserName,
uid: Cryptpad.getUid(),
}; };
addToUserData(myData); addToUserData(myData);
Cryptpad.setAttribute('username', newName, function (err, data) { Cryptpad.setAttribute('username', newName, function (err, data) {
@ -652,7 +653,8 @@ define([
} else { } else {
var myData = {}; var myData = {};
myData[info.myId] = { myData[info.myId] = {
name: "" name: "",
uid: Cryptpad.getUid(),
}; };
addToUserData(myData); addToUserData(myData);
APP.$userNameButton.click(); APP.$userNameButton.click();

@ -268,7 +268,8 @@ define([
} }
myUserName = myUserNameTemp; myUserName = myUserNameTemp;
myData[myID] = { myData[myID] = {
name: myUserName name: myUserName,
uid: Cryptpad.getUid(),
}; };
addToUserData(myData); addToUserData(myData);
Cryptpad.setAttribute('username', myUserName, function (err, data) { Cryptpad.setAttribute('username', myUserName, function (err, data) {
@ -783,7 +784,8 @@ define([
setName(lastName); setName(lastName);
} else { } else {
myData[myID] = { myData[myID] = {
name: "" name: "",
uid: Cryptpad.getUid(),
}; };
addToUserData(myData); addToUserData(myData);
onLocal(); onLocal();

Loading…
Cancel
Save