From f244140a17699ead54addd97a9d59ffb28420c1b Mon Sep 17 00:00:00 2001 From: Gredin 67 Date: Sun, 7 Feb 2021 20:42:56 +0100 Subject: [PATCH] create community for bridged chats --- conf/config.yaml | 2 +- manifest.json | 8 ++++---- scripts/install | 9 +++------ 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/conf/config.yaml b/conf/config.yaml index 4eef4e8..d5cf6a7 100644 --- a/conf/config.yaml +++ b/conf/config.yaml @@ -88,7 +88,7 @@ bridge: # (Note that, by default, non-admins might not have your homeserver's permission to create # communities. You should set `enable_group_creation: true` in homeserver.yaml to fix this.) # `facebook_{localpart}={server}` is a good value. - community_template: null + community_template: 'facebook_{localpart}={server}' # Displayname template for Facebook users. # {displayname} is replaced with the display name of the Facebook user # as defined below in displayname_preference. diff --git a/manifest.json b/manifest.json index 6f71ed0..e2558fb 100644 --- a/manifest.json +++ b/manifest.json @@ -86,11 +86,11 @@ "en": "Choose Matrix user(s) authorized to bridge with the Facebook bot", "fr": "Choisissez le/les compte(s) Matrix autorisés à utiliser le robot Facebook" }, - "example": "admin or local or @johndoe:server.name or server.name or *", - "default": "admin", + "example": "local or @johndoe:server.name or server.name or *", + "default": "local", "help": { - "en": "Either the administrator only (admin), 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": "On peut autoriser le compte administrateur seul (admin), 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." + "en": "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": "On peut autoriser 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 8e9efd6..c106c16 100755 --- a/scripts/install +++ b/scripts/install @@ -193,9 +193,6 @@ ynh_replace_string --match_string=__ENCRYPTION__ --replace_string=$encryption -- if [ "$botusers" = "local" ] then ynh_replace_string --match_string=__BOTUSERS__ --replace_string=$server_name --target_file="$mautrix_config_path" -elif [ "$botusers" = "admin" ] -then -ynh_replace_string --match_string=__BOTUSERS__ --replace_string=$botadmin --target_file="$mautrix_config_path" else ynh_replace_string --match_string=__BOTUSERS__ --replace_string=$botusers --target_file="$mautrix_config_path" fi @@ -274,14 +271,14 @@ ynh_script_progression --message="Starting a systemd service..." --weight=1 # Start a systemd service ynh_systemd_action --service_name=$app --action="start" # Wait until the synapse user is created -#sleep 30 +sleep 30 # # (Note that, by default, non-admins might not have your homeserver's permission to create communities.) # if [ "$bot_is_synapse_admin" = true ] # then -# ynh_psql_execute_as_root --database=$synapse_db_name --sql="UPDATE users SET admin = 1 WHERE name = ""$facebookbot"";" + ynh_psql_execute_as_root --database=$synapse_db_name --sql="UPDATE users SET admin = 1 WHERE name = ""$facebookbot"";" # #yunohost app action run $synapse_instance set_admin_user -a username=$facebookbot # fi -#ynh_systemd_action --service_name=$app --action="restart" +ynh_systemd_action --service_name=$app --action="restart" #================================================= # END OF SCRIPT