Remove one level of indentation
This commit is contained in:
@@ -95,34 +95,34 @@ function checkAppUpdates(callback) {
|
|||||||
|
|
||||||
if (oldState[app.id] === newState[app.id]) {
|
if (oldState[app.id] === newState[app.id]) {
|
||||||
debug('Skipping notification of app update %s since user was already notified', app.id);
|
debug('Skipping notification of app update %s since user was already notified', app.id);
|
||||||
iteratorDone();
|
return iteratorDone();
|
||||||
} else {
|
}
|
||||||
settings.getSubscription(function (error, result) {
|
|
||||||
|
settings.getSubscription(function (error, result) {
|
||||||
|
if (error) {
|
||||||
|
debug(error);
|
||||||
|
return iteratorDone();
|
||||||
|
}
|
||||||
|
|
||||||
|
// always send notifications if user is on the free plan
|
||||||
|
if (result.plan.id === 'free' || result.plan.id === 'undecided') {
|
||||||
|
debug('Notifying user of app update for %s from %s to %s', app.id, app.manifest.version, updateInfo.manifest.version);
|
||||||
|
mailer.appUpdateAvailable(app, updateInfo);
|
||||||
|
return iteratorDone();
|
||||||
|
}
|
||||||
|
|
||||||
|
// only send notifications if update pattern is 'never'
|
||||||
|
settings.getAutoupdatePattern(function (error, result) {
|
||||||
if (error) {
|
if (error) {
|
||||||
debug(error);
|
debug(error);
|
||||||
return iteratorDone();
|
} else if (result === constants.AUTOUPDATE_PATTERN_NEVER) {
|
||||||
}
|
|
||||||
|
|
||||||
// always send notifications if user is on the free plan
|
|
||||||
if (result.plan.id === 'free' || result.plan.id === 'undecided') {
|
|
||||||
debug('Notifying user of app update for %s from %s to %s', app.id, app.manifest.version, updateInfo.manifest.version);
|
debug('Notifying user of app update for %s from %s to %s', app.id, app.manifest.version, updateInfo.manifest.version);
|
||||||
mailer.appUpdateAvailable(app, updateInfo);
|
mailer.appUpdateAvailable(app, updateInfo);
|
||||||
return iteratorDone();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// only send notifications if update pattern is 'never'
|
iteratorDone();
|
||||||
settings.getAutoupdatePattern(function (error, result) {
|
|
||||||
if (error) {
|
|
||||||
debug(error);
|
|
||||||
} else if (result === constants.AUTOUPDATE_PATTERN_NEVER) {
|
|
||||||
debug('Notifying user of app update for %s from %s to %s', app.id, app.manifest.version, updateInfo.manifest.version);
|
|
||||||
mailer.appUpdateAvailable(app, updateInfo);
|
|
||||||
}
|
|
||||||
|
|
||||||
iteratorDone();
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
}
|
});
|
||||||
});
|
});
|
||||||
}, function () {
|
}, function () {
|
||||||
newState.box = loadState().box; // preserve the latest box state information
|
newState.box = loadState().box; // preserve the latest box state information
|
||||||
|
|||||||
Reference in New Issue
Block a user