Skip to content

Commit

Permalink
And temporary tweak to enable advanced_settings for existing users
Browse files Browse the repository at this point in the history
Will be removed in a later release.

Signed-off-by: Mike Beattie <mike@ethernal.org>
  • Loading branch information
mjbnz committed Mar 28, 2022
1 parent e581a99 commit 86930c2
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Sources/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,15 @@ function APIRequest(jsonObj) {
}
}

// Temporary tweak to not break existing user configs after creating 'advanced_settings' boolean
// If the settings hash has more than one key, and it has a request_url, it's got other settings, so set it to true.
if (!settings.hasOwnProperty('advanced_settings') && settings.hasOwnProperty('request_url') && (Object.keys(settings).length > 1)) {
log('enabling advanced settings');
settings.advanced_settings = true;
$SD.api.setSettings(context, settings);
}
// End temporary tweak

restartPeriodicPoll();

return {
Expand Down

0 comments on commit 86930c2

Please sign in to comment.