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

Fix setting the bot admin in restore

This commit is contained in:
Mayeul Cantan 2024-04-27 15:58:30 +02:00
parent b87c3d73e6
commit 2171a7fc09

View file

@ -74,8 +74,8 @@ ynh_systemd_action --service_name="$app" --action="start" --log_path="/var/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.)
if [ "$bot_synapse_adm" = true ]; then
ynh_psql_execute_as_root --database="$synapse_db_name" --sql="UPDATE users SET admin = 1 WHERE name = \"$botname\";"
if [ "$bot_synapse_adm" = true ] || [ "$bot_synapse_adm" = "1" ]; then
ynh_psql_execute_as_root --database="$synapse_db_name" --sql="UPDATE users SET admin = 1 WHERE name LIKE '@$botname:';"
# #yunohost app action run $synapse_instance set_admin_user -a username=$botname
fi