diff --git a/conf/config.yaml b/conf/config.yaml index ddb437d..194226d 100644 --- a/conf/config.yaml +++ b/conf/config.yaml @@ -113,7 +113,7 @@ signal: bridge: # Localpart template of MXIDs for Signal users. # {userid} is replaced with an identifier for the Signal user. - username_template: __USERNAME_TEMPLATE__ + username_template: "__USERNAME_TEMPLATE__" # Displayname template for Signal users. # {displayname} is replaced with the displayname of the Signal user, which is the first # available variable in displayname_preference. The variables in displayname_preference diff --git a/config_panel.toml b/config_panel.toml index 256238f..b411670 100644 --- a/config_panel.toml +++ b/config_panel.toml @@ -102,7 +102,7 @@ services = ["__APP__"] [bridge.config.contact_list_names] ask = "Should contact list displaynames be used?" - type = select + type = "select" choices = ["disallow", "allow", "prefer"] help = "Multi-user instances are recommended to disallow contact list names, as otherwise there can be conflicts between names from different users' contact lists." bind = ":__FINALPATH__/config.yaml" diff --git a/manifest.json b/manifest.json index 56a6de4..fca9910 100644 --- a/manifest.json +++ b/manifest.json @@ -77,11 +77,11 @@ "en": "Choose Matrix user(s) authorized to bridge with the Signal bot", "fr": "Choisissez le/les compte(s) Matrix autorisés à utiliser la passerelle Signal" }, - "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": "Soit 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 5fd6d22..8b30e64 100755 --- a/scripts/install +++ b/scripts/install @@ -32,11 +32,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_bridge bridge if [ $synapsenumber -eq "1" ] then @@ -52,6 +47,11 @@ bot_synapse_db_user="@$botname:$server_name" synapse_db_name="matrix_$synapse_instance" signald_user="signald" # This is actually chosen by the signald dependency +if [ "$botusers" == "local" ] +then + botusers=$server_name +fi + #================================================= # SET STANDARD SETTINGS FROM DEFAULT CONFIG #================================================= @@ -65,10 +65,10 @@ metrics_listen_port=8000 registration_enabled=true enable_disappearing_messages_in_groups=false username_template="sg_{userid}" -contact_list_names=disallow +contact_list_names="disallow" federate_rooms=true encryption_default=false -print_level=INFO +print_level="INFO" ynh_app_setting_set --app=$app --key=appserviceid --value=$appserviceid ynh_app_setting_set --app=$app --key=displayname --value=$displayname diff --git a/scripts/upgrade b/scripts/upgrade index 5116c9f..0bb2dc6 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -138,7 +138,7 @@ fi if [ -z "$contact_list_names" ] then - contact_list_names=disallow + contact_list_names="disallow" ynh_app_setting_set --app=$app --key=contact_list_names --value=$contact_list_names fi @@ -156,7 +156,7 @@ fi if [ -z "$print_level" ] then - print_level=INFO + print_level="INFO" ynh_app_setting_set --app=$app --key=print_level --value=$print_level fi