1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/mautrix_signal_ynh.git synced 2024-09-03 19:46:07 +02:00

create community for bridged chats

This commit is contained in:
Gredin 67 2021-02-07 20:42:56 +01:00
parent 792f8b9da2
commit f244140a17
3 changed files with 8 additions and 11 deletions

View file

@ -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.

View file

@ -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."
}
}
]

View file

@ -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