diff --git a/www/common/common-feedback.js b/www/common/common-feedback.js index 6d2c62e30..f0b7d989b 100644 --- a/www/common/common-feedback.js +++ b/www/common/common-feedback.js @@ -21,15 +21,15 @@ define([ }; http.send(); }; - Feedback.send = function (action, force) { - if (AppConfig.disableFeedback) { return; } - if (!action) { return; } + Feedback.send = function (action, force, cb) { + if (AppConfig.disableFeedback) { return void cb(); } + if (!action) { return void cb(); } if (force !== true) { - if (!Feedback.state) { return; } + if (!Feedback.state) { return void cb(); } } var href = '/common/feedback.html?' + action + '=' + randomToken(); - ajax(href); + ajax(href, cb); }; Feedback.reportAppUsage = function () { diff --git a/www/common/cryptpad-common.js b/www/common/cryptpad-common.js index 61e8b3a71..0b72dccbc 100644 --- a/www/common/cryptpad-common.js +++ b/www/common/cryptpad-common.js @@ -89,7 +89,6 @@ define([ value: token }, function (obj) { if (obj && obj.error) { return void cb(obj.error); } - Feedback.send('LOGOUT_EVERYWHERE'); cb(); }); }; @@ -934,7 +933,12 @@ define([ } }).nThen(function () { // We have the new drive, with the new login block - window.location.reload(); + var feedbackKey = (password === newPassword)? + 'OWNED_DRIVE_MIGRATION': 'PASSWORD_CHANGED'; + + Feedback.send(feedbackKey, undefined, function () { + window.location.reload(); + }); }); }; diff --git a/www/settings/inner.js b/www/settings/inner.js index 7f700f959..4b1836e64 100644 --- a/www/settings/inner.js +++ b/www/settings/inner.js @@ -212,6 +212,7 @@ define([ $spinner.show(); $ok.hide(); + Feedback.send('LOGOUT_EVERYWHERE'); sframeChan.query('Q_SETTINGS_LOGOUT', null, function () { $spinner.hide(); $ok.show();