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:
parent
792f8b9da2
commit
f244140a17
3 changed files with 8 additions and 11 deletions
|
@ -88,7 +88,7 @@ bridge:
|
||||||
# (Note that, by default, non-admins might not have your homeserver's permission to create
|
# (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.)
|
# communities. You should set `enable_group_creation: true` in homeserver.yaml to fix this.)
|
||||||
# `facebook_{localpart}={server}` is a good value.
|
# `facebook_{localpart}={server}` is a good value.
|
||||||
community_template: null
|
community_template: 'facebook_{localpart}={server}'
|
||||||
# Displayname template for Facebook users.
|
# Displayname template for Facebook users.
|
||||||
# {displayname} is replaced with the display name of the Facebook user
|
# {displayname} is replaced with the display name of the Facebook user
|
||||||
# as defined below in displayname_preference.
|
# as defined below in displayname_preference.
|
||||||
|
|
|
@ -86,11 +86,11 @@
|
||||||
"en": "Choose Matrix user(s) authorized to bridge with the Facebook bot",
|
"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"
|
"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 *",
|
"example": "local or @johndoe:server.name or server.name or *",
|
||||||
"default": "admin",
|
"default": "local",
|
||||||
"help": {
|
"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.",
|
"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 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."
|
"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."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -193,9 +193,6 @@ ynh_replace_string --match_string=__ENCRYPTION__ --replace_string=$encryption --
|
||||||
if [ "$botusers" = "local" ]
|
if [ "$botusers" = "local" ]
|
||||||
then
|
then
|
||||||
ynh_replace_string --match_string=__BOTUSERS__ --replace_string=$server_name --target_file="$mautrix_config_path"
|
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
|
else
|
||||||
ynh_replace_string --match_string=__BOTUSERS__ --replace_string=$botusers --target_file="$mautrix_config_path"
|
ynh_replace_string --match_string=__BOTUSERS__ --replace_string=$botusers --target_file="$mautrix_config_path"
|
||||||
fi
|
fi
|
||||||
|
@ -274,14 +271,14 @@ ynh_script_progression --message="Starting a systemd service..." --weight=1
|
||||||
# Start a systemd service
|
# Start a systemd service
|
||||||
ynh_systemd_action --service_name=$app --action="start"
|
ynh_systemd_action --service_name=$app --action="start"
|
||||||
# Wait until the synapse user is created
|
# 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.)
|
# # (Note that, by default, non-admins might not have your homeserver's permission to create communities.)
|
||||||
# if [ "$bot_is_synapse_admin" = true ]
|
# if [ "$bot_is_synapse_admin" = true ]
|
||||||
# then
|
# 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
|
# #yunohost app action run $synapse_instance set_admin_user -a username=$facebookbot
|
||||||
# fi
|
# fi
|
||||||
#ynh_systemd_action --service_name=$app --action="restart"
|
ynh_systemd_action --service_name=$app --action="restart"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# END OF SCRIPT
|
# END OF SCRIPT
|
||||||
|
|
Loading…
Add table
Reference in a new issue