diff --git a/config_panel.toml b/config_panel.toml index a0be1a0..18290b1 100644 --- a/config_panel.toml +++ b/config_panel.toml @@ -64,7 +64,7 @@ services = ["__APP__"] [appservice.metrics.metrics_listen_port] ask = "IP and Port for the Metrics listener?" type = "string" - help = "Default "127.0.0.1:8001". The path is always /metrics" + help = "Defaults to: '127.0.0.1:8001'. The path is always /metrics" bind = ":__FINALPATH__/config.yaml" [whatsapp] diff --git a/manifest.json b/manifest.json index e647b7d..df4a8f4 100644 --- a/manifest.json +++ b/manifest.json @@ -104,11 +104,11 @@ "en": "Choose Matrix user(s) authorized to bridge with the WhatsApp bot.", "fr": "Choisissez le/les compte(s) Matrix autorisés à utiliser la passerelle WhatsApp." }, - "example": "admin or domain or @johndoe:server.name or server.name or *", - "default": "domain", + "example": "local or @johndoe:server.name or server.name or *", + "default": "local", "help": { - "en": "Either the administrator only (admin), all local Synapse users (domain), a remote or local user (@johndoe:server.name), a remote server (matrix.org), or all remote/local servers (*) can be authorized. Give the Matrix server_name, not the full domain/URL.", - "fr": "L'administrateur seulement (admin), tous les comptes Synapse locaux (domain), un compte local ou distant (@johndoe:server.name), un serveur distant (matrix.org), ou tous les serveurs remote/local (*). Donner le nom du serveur Matrix, pas le domaine/URL complet." + "en": "Either all local Synapse users (local), a remote or local user (@johndoe:server.name), a remote server (matrix.org), or all remote/local servers (*) can be authorized. Give the Matrix server_name, not the full domain/URL.", + "fr": "Soir tous les comptes Synapse locaux (local), un compte local ou distant (@johndoe:server.name), un serveur distant (matrix.org), ou tous les serveurs remote/local (*). Donner le nom du serveur Matrix, pas le domaine/URL complet." } } ] diff --git a/scripts/install b/scripts/install index 1f2effa..259e535 100755 --- a/scripts/install +++ b/scripts/install @@ -33,11 +33,6 @@ botusers=$YNH_APP_ARG_BOTUSERS app=$YNH_APP_INSTANCE_NAME -if [ "$botusers" == "admin" ] -then - botusers=$botadmin -fi - # ToDo check (in manifest?) if the selected synapse instance is not already connected to a mautrix_whatsapp bridge if [ $synapsenumber -eq "1" ] then @@ -49,6 +44,11 @@ server_name=$(ynh_app_setting_get --app $synapse_instance --key server_name) domain=$(ynh_app_setting_get --app $synapse_instance --key domain) synapse_db_name="matrix_$synapse_instance" +if [ "$botusers" == "local" ] +then + botusers="$server_name" +fi + #================================================= # SET STANDARD SETTINGS FROM DEFAULT CONFIG #================================================= @@ -105,10 +105,6 @@ ynh_script_progression --message="Validating installation parameters..." --weigh final_path=/opt/yunohost/$app test ! -e "$final_path" || ynh_die --message="This path already contains a folder" -if [ $encryption -eq 1 ]; then - encryption="true" -fi - #================================================= # STORE SETTINGS FROM MANIFEST #================================================= @@ -236,7 +232,7 @@ ynh_script_progression --message="Starting a systemd service..." --weight=15 ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" # Wait until the synapse user is created sleep 30 - # (Note that, by default, non-admins might not have your homeserver's permission to create communities.) + # (Note that, by default, non-admins might not have your homeserver's permission to create Spaces.) if [ "$bot_synapse_adm" = true ] then ynh_psql_execute_as_root --database=$synapse_db_name --sql="UPDATE users SET admin = 1 WHERE name = ""$botname"";"