From 6156e9bbdd7b5957532f2c9ad340aa11983150de Mon Sep 17 00:00:00 2001 From: CodeShakingSheep <19874562+CodeShakingSheep@users.noreply.github.com> Date: Wed, 3 Jul 2024 13:20:11 -0500 Subject: [PATCH 1/6] Update _common.sh Add helper for getting synapse DB name --- scripts/_common.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/scripts/_common.sh b/scripts/_common.sh index 8a31c04..674ce8d 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -2,6 +2,16 @@ APP_BIN=mautrix-discord +#================================================= +# PERSONAL HELPERS +#================================================= + +get_synapse_db_name() { + # Parameters: synapse instance identifier + # Returns: database name + ynh_app_setting_get --app="$1" --key=db_name +} + apply_permissions() { set -o noglob # Disable globbing to avoid expansions when passing * as value. declare values="list$role" From 5123430ac3b76d221255891072f0275abc7e47f1 Mon Sep 17 00:00:00 2001 From: CodeShakingSheep <19874562+CodeShakingSheep@users.noreply.github.com> Date: Wed, 3 Jul 2024 13:21:22 -0500 Subject: [PATCH 2/6] Update install Fix synapse DB name --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 35c6880..b7710a5 100755 --- a/scripts/install +++ b/scripts/install @@ -14,7 +14,7 @@ server_name=$(ynh_app_setting_get --app $synapse_instance --key server_name) domain=$(ynh_app_setting_get --app $synapse_instance --key domain) ynh_app_setting_set --app=$app --key=server_name --value=$server_name ynh_app_setting_set --app=$app --key=domain --value=$domain -synapse_db_name="matrix_$synapse_instance" +synapse_db_name="$(get_synapse_db_name $synapse_instance)" synapse_version=$(yunohost app info $synapse_instance | grep -oP "version:\s*\K.*") From bdc0cfae08d946b9800fb0bc7499141920e80101 Mon Sep 17 00:00:00 2001 From: CodeShakingSheep <19874562+CodeShakingSheep@users.noreply.github.com> Date: Wed, 3 Jul 2024 13:22:54 -0500 Subject: [PATCH 3/6] Update restore Fix synapse DB name --- scripts/restore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/restore b/scripts/restore index 1742f10..a22c121 100755 --- a/scripts/restore +++ b/scripts/restore @@ -12,7 +12,7 @@ source /usr/share/yunohost/helpers server_name=$(ynh_app_setting_get --app=$app --key=server_name) -synapse_db_name="matrix_$synapse_instance" +synapse_db_name="$(get_synapse_db_name $synapse_instance)" bot_synapse_db_user="@$botname:$server_name" async_media=$(ynh_app_setting_get --app=$app --key=async_media) From 5fa02ababfeea67b862f503afed4122fb8dac07b Mon Sep 17 00:00:00 2001 From: CodeShakingSheep <19874562+CodeShakingSheep@users.noreply.github.com> Date: Wed, 3 Jul 2024 13:23:24 -0500 Subject: [PATCH 4/6] Update upgrade Fix synapse DB name --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 038403f..cf77d39 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -11,7 +11,7 @@ source /usr/share/yunohost/helpers server_name=$(ynh_app_setting_get --app=$app --key=server_name) -synapse_db_name="matrix_$synapse_instance" +synapse_db_name="$(get_synapse_db_name $synapse_instance)" bot_synapse_db_user="@$botname:$server_name" appserviceid=$app From ae356fbda9cf3d27b144ba152af6e0127de8410e Mon Sep 17 00:00:00 2001 From: Florent Date: Thu, 4 Jul 2024 09:18:41 +0200 Subject: [PATCH 5/6] Bump version --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index 18ca30d..4150834 100644 --- a/manifest.toml +++ b/manifest.toml @@ -7,7 +7,7 @@ name = "Matrix-Discord bridge" description.en = "Matrix / Synapse puppeting bridge for Discord" description.fr = "Passerelle Matrix / Synapse pour Discord" -version = "0.6.5~ynh2" +version = "0.6.5~ynh3" maintainers = ["fflorent"] From ba84e0e0b7811b255b4950ff6201aaaaf9caa9c8 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Thu, 4 Jul 2024 07:18:44 +0000 Subject: [PATCH 6/6] Auto-update READMEs --- README.md | 2 +- README_es.md | 2 +- README_eu.md | 2 +- README_fr.md | 2 +- README_gl.md | 2 +- README_zh_Hans.md | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index abc439f..1e0951b 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ A puppeting bridge between Matrix and Discord packaged as a YunoHost service. Me **Attention: always backup and restore the Yunohost matrix_synapse et mautrix_discord apps together!** -**Shipped version:** 0.6.5~ynh2 +**Shipped version:** 0.6.5~ynh3 ## Documentation and resources - Official admin documentation: diff --git a/README_es.md b/README_es.md index 615648f..e19c186 100644 --- a/README_es.md +++ b/README_es.md @@ -21,7 +21,7 @@ A puppeting bridge between Matrix and Discord packaged as a YunoHost service. Me **Attention: always backup and restore the Yunohost matrix_synapse et mautrix_discord apps together!** -**Versión actual:** 0.6.5~ynh2 +**Versión actual:** 0.6.5~ynh3 ## Documentaciones y recursos - Documentación administrador oficial: diff --git a/README_eu.md b/README_eu.md index 500e26d..acc86ed 100644 --- a/README_eu.md +++ b/README_eu.md @@ -21,7 +21,7 @@ A puppeting bridge between Matrix and Discord packaged as a YunoHost service. Me **Attention: always backup and restore the Yunohost matrix_synapse et mautrix_discord apps together!** -**Paketatutako bertsioa:** 0.6.5~ynh2 +**Paketatutako bertsioa:** 0.6.5~ynh3 ## Dokumentazioa eta baliabideak - Administratzaileen dokumentazio ofiziala: diff --git a/README_fr.md b/README_fr.md index ba976ef..a2d7c74 100644 --- a/README_fr.md +++ b/README_fr.md @@ -20,7 +20,7 @@ Un pont entre Matrix et Discord présenté comme un service YunoHost. Les messag **Attention : toujours sauvegarder et restaurer les applications matrix_synapse et mautrix_discord de Yunohost ensemble ! -**Version incluse :** 0.6.5~ynh2 +**Version incluse :** 0.6.5~ynh3 ## Documentations et ressources - Documentation officielle de l’admin : diff --git a/README_gl.md b/README_gl.md index 94ece76..4bec332 100644 --- a/README_gl.md +++ b/README_gl.md @@ -21,7 +21,7 @@ A puppeting bridge between Matrix and Discord packaged as a YunoHost service. Me **Attention: always backup and restore the Yunohost matrix_synapse et mautrix_discord apps together!** -**Versión proporcionada:** 0.6.5~ynh2 +**Versión proporcionada:** 0.6.5~ynh3 ## Documentación e recursos - Documentación oficial para admin: diff --git a/README_zh_Hans.md b/README_zh_Hans.md index 2eac993..a693108 100644 --- a/README_zh_Hans.md +++ b/README_zh_Hans.md @@ -21,7 +21,7 @@ A puppeting bridge between Matrix and Discord packaged as a YunoHost service. Me **Attention: always backup and restore the Yunohost matrix_synapse et mautrix_discord apps together!** -**分发版本:** 0.6.5~ynh2 +**分发版本:** 0.6.5~ynh3 ## 文档与资源 - 官方管理文档: