|
|
@ -33,7 +33,10 @@ define([
|
|
|
|
//console.log('EV_METADATA_UPDATE');
|
|
|
|
//console.log('EV_METADATA_UPDATE');
|
|
|
|
var name;
|
|
|
|
var name;
|
|
|
|
nThen(function (waitFor) {
|
|
|
|
nThen(function (waitFor) {
|
|
|
|
Cryptpad.getLastName(waitFor(function (n) { name = n }));
|
|
|
|
Cryptpad.getLastName(waitFor(function (err, n) {
|
|
|
|
|
|
|
|
if (err) { console.log(err); }
|
|
|
|
|
|
|
|
name = n;
|
|
|
|
|
|
|
|
}));
|
|
|
|
}).nThen(function (waitFor) {
|
|
|
|
}).nThen(function (waitFor) {
|
|
|
|
sframeChan.event('EV_METADATA_UPDATE', {
|
|
|
|
sframeChan.event('EV_METADATA_UPDATE', {
|
|
|
|
doc: {
|
|
|
|
doc: {
|
|
|
@ -71,6 +74,19 @@ define([
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
sframeChan.on('Q_SETTINGS_SET_DISPLAY_NAME', function (newName, cb) {
|
|
|
|
|
|
|
|
Cryptpad.setAttribute('username', newName, function (err) {
|
|
|
|
|
|
|
|
if (err) {
|
|
|
|
|
|
|
|
console.log("Couldn't set username");
|
|
|
|
|
|
|
|
console.error(err);
|
|
|
|
|
|
|
|
cb('ERROR');
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
Cryptpad.changeDisplayName(newName, true);
|
|
|
|
|
|
|
|
cb();
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
CpNfOuter.start({
|
|
|
|
CpNfOuter.start({
|
|
|
|
sframeChan: sframeChan,
|
|
|
|
sframeChan: sframeChan,
|
|
|
|
channel: secret.channel,
|
|
|
|
channel: secret.channel,
|
|
|
|