diff --git a/www/admin/inner.js b/www/admin/inner.js index d9bebc097..7b88fcbdf 100644 --- a/www/admin/inner.js +++ b/www/admin/inner.js @@ -120,7 +120,8 @@ define([ Messages.admin_archiveInput = "Document URL"; Messages.admin_archiveInput2 = "Document password"; Messages.admin_archiveInval = "Invalid document"; - Messages.restoredFromServer = "Pad restored"; + Messages.restoredFromServer = "Document restored"; + Messages.archivedFromServer = "Document archived"; var archiveForm = function (archive, $div, $button) { var label = h('label', { for: 'cp-admin-archive' }, Messages.admin_archiveInput); @@ -221,7 +222,7 @@ define([ console.error(e); return; } - UI.log(archive ? Messages.deletedFromServer : Messages.restoredFromServer); + UI.log(archive ? Messages.archivedFromServer : Messages.restoredFromServer); $input.val(''); $pwInput.val(''); }); diff --git a/www/common/common-messaging.js b/www/common/common-messaging.js index 15d0408f7..65f05961e 100644 --- a/www/common/common-messaging.js +++ b/www/common/common-messaging.js @@ -91,7 +91,7 @@ define([ Msg.updateMyData = function (store, curve) { var myData = createData(store.proxy, false); if (store.proxy.friends) { - store.proxy.friends.me = myData; + store.proxy.friends.me = Util.clone(myData); delete store.proxy.friends.me.channel; } if (store.modules['team']) { @@ -99,6 +99,7 @@ define([ } var todo = function (friend) { if (!friend || !friend.notifications) { return; } + delete friend.user; myData.channel = friend.channel; store.mailbox.sendTo('UPDATE_DATA', myData, { channel: friend.notifications, diff --git a/www/common/sframe-common-outer.js b/www/common/sframe-common-outer.js index e9dee4447..a03f61730 100644 --- a/www/common/sframe-common-outer.js +++ b/www/common/sframe-common-outer.js @@ -8,7 +8,7 @@ define([ ], function (nThen, ApiConfig, RequireConfig, Messages, $) { var common = {}; - common.initIframe = function (waitFor, isRt) { + common.initIframe = function (waitFor, isRt, pathname) { var requireConfig = RequireConfig(); var lang = Messages._languageUsed; var req = { @@ -31,7 +31,7 @@ define([ } document.getElementById('sbox-iframe').setAttribute('src', - ApiConfig.httpSafeOrigin + window.location.pathname + 'inner.html?' + + ApiConfig.httpSafeOrigin + (pathname || window.location.pathname) + 'inner.html?' + requireConfig.urlArgs + '#' + encodeURIComponent(JSON.stringify(req))); // This is a cheap trick to avoid loading sframe-channel in parallel with the