diff --git a/conf/homeserver.yaml b/conf/homeserver.yaml index f45de3c..0a220c3 100644 --- a/conf/homeserver.yaml +++ b/conf/homeserver.yaml @@ -2418,7 +2418,7 @@ push: # The default value is "true" to include message details. Uncomment to only # include the event ID and room ID in push notification payloads. # - #include_content: false + include_content: __PUSH_INCLUDE_CONTENT__ # When a push notification is received, an unread count is also sent. # This number can either be calculated as the number of unread messages diff --git a/config_panel.toml b/config_panel.toml index b709cca..5cd81bb 100644 --- a/config_panel.toml +++ b/config_panel.toml @@ -100,6 +100,14 @@ services = ["matrix-__APP__"] help = "Overrides 3PID settings if MSISDNs are set as required." bind = ":/etc/matrix-__APP__/homeserver.yaml" visible = "enable_registration" + + [main.privacy.push_include_content] + ask = "Disable content sharing inside push notification." + type = "boolean" + yes = true + no = false + help = "Send content message and sender infromation in push notification. Set to false increase privacy when GAFAM notification service is used (ie: when element client is downloaded thrue Gplay store)." + bind = "push>include_content:/etc/matrix-__APP__/homeserver.yaml" [main.experience] name = "User Experience" diff --git a/scripts/install b/scripts/install index 5557af4..407f49a 100644 --- a/scripts/install +++ b/scripts/install @@ -144,6 +144,7 @@ password_enabled="true" enable_notifs="true" notif_for_new_users="true" enable_group_creation="true" +push_include_content="true" ynh_app_setting_set --app=$app --key=backup_before_upgrade --value=$backup_before_upgrade ynh_app_setting_set --app=$app --key=server_statistics --value=$server_statistics @@ -166,6 +167,8 @@ ynh_app_setting_set --app=$app --key=password_enabled --value=$password_enabled ynh_app_setting_set --app=$app --key=enable_notifs --value=$enable_notifs ynh_app_setting_set --app=$app --key=notif_for_new_users --value=$notif_for_new_users ynh_app_setting_set --app=$app --key=enable_group_creation --value=$enable_group_creation +ynh_app_setting_set --app=$app --key=push_include_content --value=$push_include_content + #================================================= # STANDARD MODIFICATIONS diff --git a/scripts/upgrade b/scripts/upgrade index 6f38269..f22b658 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -86,6 +86,7 @@ turn_allow_guests=$(ynh_app_setting_get --app=$app --key=turn_allow_guests) sso_enabled=$(ynh_app_setting_get --app=$app --key=sso_enabled) password_enabled=$(ynh_app_setting_get --app=$app --key=password_enabled) enable_3pid_lookup=$(ynh_app_setting_get --app=$app --key=enable_3pid_lookup) +push_include_content=$(ynh_app_setting_get --app=$app --key=push_include_content) #================================================= # ENSURE DOWNWARD COMPATIBILITY @@ -350,6 +351,12 @@ then ynh_app_setting_set --app=$app --key=enable_3pid_lookup --value=$enable_3pid_lookup fi +if [ -z "$push_include_content" ] +then + push_include_content="true" + ynh_app_setting_set --app=$app --key=push_include_content --value=$push_include_content +fi + #================================================= # INSTALL DEPENDENCIES #=================================================