Revert "Do not send box update emails to admins"

This reverts commit 865b041474.
This commit is contained in:
Johannes Zellner
2017-01-27 08:03:55 -08:00
parent cbfad632c2
commit 6ce8899231

View File

@@ -198,6 +198,24 @@ function checkBoxUpdates(callback) {
gBoxUpdateInfo = updateInfo;
// decide whether to send email
var state = loadState();
if (state.box === gBoxUpdateInfo.version) {
debug('Skipping notification of box update as user was already notified');
return callback();
}
if (semver.satisfies(gBoxUpdateInfo.version, '~' + config.version())) {
debug('Skipping notification of box update as this is a patch release');
} else {
mailer.boxUpdateAvailable(updateInfo.version, updateInfo.changelog);
}
state.box = updateInfo.version;
saveState(state);
callback();
});
});