From a3146ea59d4fce005d6dca548c19a450d44604ad Mon Sep 17 00:00:00 2001 From: Benedikt Tissot Date: Fri, 3 Dec 2021 09:35:20 +0100 Subject: [PATCH] remove bot_synapse_adm and maintainer + update as I do not use yunohost anymore testing is unnecessary complicated, hopefully someone else wants to go on with maintaining this app --- check_process | 1 - conf/app.src | 4 ++-- manifest.json | 17 ++--------------- scripts/install | 11 ----------- scripts/upgrade | 7 ------- 5 files changed, 4 insertions(+), 36 deletions(-) diff --git a/check_process b/check_process index 5eee6e7..b77caa5 100644 --- a/check_process +++ b/check_process @@ -6,7 +6,6 @@ port="29317" synapsenumber="1" botname="telegrambot" - bot_synapse_adm=true encryption=false botadmin="@johndoe:synapsedomain.tld" botusers="@johndoe:synapsedomain.tld" diff --git a/conf/app.src b/conf/app.src index eced268..49724ac 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/mautrix/telegram/archive/refs/tags/v0.10.1.tar.gz -SOURCE_SUM=81376427d454b6c99c01b244027cd7609d19ef84653625d4027ba92fd5de0466 +SOURCE_URL=https://github.com/mautrix/telegram/archive/refs/tags/v0.10.2.tar.gz +SOURCE_SUM=6c55dd22d71dc8c78a3069acabcd66d8c181c795688f37bfc88fc461e99f5e25 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index abe21ba..13d5662 100644 --- a/manifest.json +++ b/manifest.json @@ -17,8 +17,8 @@ }, "license": "AGPL-3.0-or-later", "maintainer": { - "name": "Benedikt Tissot", - "email": "benedikt.tissot@googlemail.com", + "name": "", + "email": "", "url": "https://github.com/YunoHost-Apps/mautrix_telegram_ynh" }, "requirements": { @@ -71,19 +71,6 @@ }, "default": false }, - { - "name": "bot_synapse_adm", - "type": "boolean", - "ask": { - "en": "Give the Telegram bot administrator rights to the synapse instance?", - "fr": "Donner au robot Telegram des droits administrateur à l'instance synapse ?" - }, - "help": { - "en": "If true, the bot can group Telegram chats in a Matrix community. Not required if you set up synapse so that non-admins are authorized to create communities.", - "fr": "Si true, le robot groupera les conversations Telegram dans une communauté Matrix. Pas nécessaire si vous avez réglé synapse pour qu'il autorise les non-admin à créer des communautés." - }, - "default": true - }, { "name": "botadmin", "type": "string", diff --git a/scripts/install b/scripts/install index dec91b3..7bcefe1 100755 --- a/scripts/install +++ b/scripts/install @@ -29,7 +29,6 @@ botname=$YNH_APP_ARG_BOTNAME encryption=$YNH_APP_ARG_ENCRYPTION botadmin=$YNH_APP_ARG_BOTADMIN botusers=$YNH_APP_ARG_BOTUSERS -bot_synapse_adm=$YNH_APP_ARG_BOT_SYNAPSE_ADM # TODO new settings specific to telegram apiid=$YNH_APP_ARG_APIID @@ -91,7 +90,6 @@ ynh_app_setting_set --app=$app --key=server_name --value=$server_name ynh_app_setting_set --app=$app --key=port --value=$port ynh_app_setting_set --app=$app --key=botname --value=$botname ynh_app_setting_set --app=$app --key=synapse_instance --value=$synapse_instance -ynh_app_setting_set --app=$app --key=bot_synapse_adm --value=$bot_synapse_adm ynh_app_setting_set --app=$app --key=app_service_registration_path --value=$app_service_registration_path ynh_app_setting_set --app=$app --key=encryption --value=$encryption ynh_app_setting_set --app=$app --key=mautrix_bridge_db_name --value=$mautrix_bridge_db_name @@ -257,15 +255,6 @@ 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 - -# (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"";" - #yunohost app action run $synapse_instance set_admin_user -a username=$botname -fi -ynh_systemd_action --service_name=$app --action="restart" #================================================= # END OF SCRIPT diff --git a/scripts/upgrade b/scripts/upgrade index 65acf3c..5d80811 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -53,13 +53,6 @@ ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 # some legacy installs and you therefore want to initiaze stuff during upgrade) # -bot_synapse_adm=$(ynh_app_setting_get --app=$app --key=bot_synapse_adm) -# If bot_synapse_adm doesn't exist, create it -if [ -z "$bot_synapse_adm" ]; then - bot_synapse_adm=true - ynh_app_setting_set --app=$app --key=bot_synapse_adm --value=$bot_synapse_adm -fi - # If final_path doesn't exist, create it #if [ -z "$final_path" ]; then # final_path=/var/www/$app