From 04606c1d4a1381ebad082829c915fb45874b964a Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 13 Jan 2022 15:53:18 +0100 Subject: [PATCH] Fix --- conf/config.json | 2 +- config_panel.toml | 6 +++--- scripts/upgrade | 8 +++++++- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/conf/config.json b/conf/config.json index 3cece86..8be39a8 100644 --- a/conf/config.json +++ b/conf/config.json @@ -24,7 +24,7 @@ ], "bug_report_endpoint_url": "https://element.io/bugreports/submit", "defaultCountryCode": "GB", - "showLabsSettings": __ENABLE_LABS__, + "showLabsSettings": "__ENABLE_LABS__", "features": { }, "default_federate": true, "default_theme": "__DEFAULT_THEME__", diff --git a/config_panel.toml b/config_panel.toml index fffcf66..39b84af 100644 --- a/config_panel.toml +++ b/config_panel.toml @@ -10,15 +10,15 @@ name = "Element configuration" ask = "Choose a default home server" type = "string" default = "matrix.org" - bind = "base_url:__FINALPATH__/config.json" + bind = "'base_url':__FINALPATH__/config.json" [main.config.enable_labs] ask = "Enable labs settings" type = "boolean" - bind = "showLabsSettings:__FINALPATH__/config.json" + bind = "'showLabsSettings':__FINALPATH__/config.json" [main.config.default_theme] ask = "Choose a theme" type = "select" choices = ["light", "dark"] - bind = "default_theme:__FINALPATH__/config.json" + bind = "'default_theme':__FINALPATH__/config.json" diff --git a/scripts/upgrade b/scripts/upgrade index 20355a8..71c4a36 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -46,7 +46,13 @@ ynh_abort_if_errors #================================================= # ENSURE DOWNWARD COMPATIBILITY #================================================= -ynh_script_progression --message="Ensuring downward compatibility..." --time --weight=1 +ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 + +# If enable_labs doesn't exist, create it +if [ -z "$default_home_server" ]; then + default_home_server="matrix.org" + ynh_app_setting_set --app=$app --key=default_home_server --value=$default_home_server +fi # If enable_labs doesn't exist, create it if [ -z "$enable_labs" ]; then