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

add manifest and encryption option

This commit is contained in:
Gredin 67 2021-01-23 01:17:28 +01:00
parent 03b279dd91
commit 0316ceddf0
3 changed files with 99 additions and 90 deletions

View file

@ -1,90 +1,98 @@
{ {
"name": "YunoHost example app", "name": "Matrix-Facebook bridge",
"id": "ynhexample", "id": "mautrix_facebook",
"packaging_format": 1, "packaging_format": 1,
"description": { "description": {
"en": "Explain in *a few (10~15) words* the purpose of the app or what it actually does (it is meant to give a rough idea to users browsing a catalog of 100+ apps)", "en": "A Facebook puppeting bridge for Matrix/Synapse.",
"fr": "Expliquez en *quelques* (10~15) mots l'utilité de l'app ou ce qu'elle fait (l'objectif est de donner une idée grossière pour des utilisateurs qui naviguent dans un catalogue de 100+ apps)" "fr": "Passerelle Facebook pour Matrix/Synapse."
}, },
"version": "1.0~ynh1", "version": "0.2.2~ynh1",
"url": "https://example.com", "url": "https://github.com/tulir/mautrix-facebook",
"license": "free", "license": "AGPL-3.0-or-later",
"maintainer": { "maintainer": {
"name": "John doe", "name": "Gredin67",
"email": "john.doe@example.com", "email": "mautrix_facebook_ynh@sans-nuage.fr",
"url": "http://example.com" "url": "https://github.com/YunoHost-Apps/mautrix_facebook_ynh"
}, },
"requirements": { "requirements": {
"yunohost": ">= 3.5" "yunohost": ">= 4.0"
}, },
"multi_instance": true, "multi_instance": true,
"services": [ "services": [
"nginx", "postgresql"
"php7.0-fpm", ],
"mysql" "arguments": {
], "install": [
"arguments": { {
"install" : [ "name": "synapsenumber",
{ "type": "string",
"name": "domain", "ask": {
"type": "domain", "en": "Choose the local synapse instance number to communicate with mautrix_facebook",
"ask": { "fr": "Choisissez le numéro de l'instance synapse qui doit communiquer avec mautrix_facebook"
"en": "Choose a domain name for ynhexample", },
"fr": "Choisissez un nom de domaine pour ynhexample" "example": "2 (for instance synapse__2)",
}, "help": {
"example": "example.com" "en": "If you installed synapse only once time, then leave default value 1.",
}, "fr": "Si vous n'avez installé qu'une fois synapse, gardez la valeur par défaut 1."
{ },
"name": "path", "default": "1"
"type": "path", },
"ask": { {
"en": "Choose a path for ynhexample", "name": "facebookbot",
"fr": "Choisissez un chemin pour ynhexample" "type": "string",
}, "ask": {
"example": "/example", "en": "Choose a local synapse user name for the Facebook bot",
"default": "/example" "fr": "Choisissez un nom d'utilisateur synapse local pour le robot Facebook"
}, },
{ "example": "facebookbot",
"name": "admin", "help": {
"type": "user", "en": "A system user will be created. Invite @facebookbot:localsynapse.servername from an authorized Matrix account to start bridging. Give the matrix server_name, not the full domain/url.",
"ask": { "fr": "Un utilisateur système sera créé. Inviter @facebookbot:localsynapse.servername depuis un compte Matrix autorisé pour démarrer une passerelle. Donner le nom du serveur matrix, pas le domaine/url complet."
"en": "Choose an admin user", },
"fr": "Choisissez l'administrateur" "default": "facebookbot"
}, },
"example": "johndoe" {
}, "name": "encryption",
{ "type": "boolean",
"name": "is_public", "ask": {
"type": "boolean", "en": "Enable end-to-bridge encryption ?",
"ask": { "fr": "Activer le chiffrement entre synapse et le bridge ?"
"en": "Is it a public application?", },
"fr": "Est-ce une application publique ?" "help": {
}, "en": "Only activate if you know the prerequisites and constraints related to e2b.",
"default": true "fr": "N'activer que si vous connaissez les prérequis et constraintes liées à e2b."
}, },
{ "default": false
"name": "language",
"type": "string", },
"ask": { {
"en": "Choose the application language", "name": "botadmin",
"fr": "Choisissez la langue de l'application" "type": "string",
}, "ask": {
"choices": ["fr", "en"], "en": "Choose the Matrix account administrator of the Facebook bot",
"default": "fr" "fr": "Choisissez le compte Matrix administrateur du robot Facebook"
}, },
{ "example": "@johndoe:localsynapse.servername or @johndoe:matrix.org",
"name": "password", "help": {
"type": "password", "en": "The Facebook bot administrator does not need to be a local synapse account.",
"ask": { "fr": "Le compte administrateur du robot Facebook peut ne pas être un compte local synapse."
"en": "Set the administrator password", },
"fr": "Définissez le mot de passe administrateur" "default": "Your main Matrix account"
}, },
"help": { {
"en": "Use the help field to add an information for the admin about this question.", "name": "botusers",
"fr": "Utilisez le champ aide pour ajouter une information à l'intention de l'administrateur à propos de cette question." "type": "string",
}, "ask": {
"example": "Choose a password" "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",
"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."
}
}
]
}
} }

View file

@ -122,7 +122,7 @@ bridge:
sync_direct_chat_list: false sync_direct_chat_list: false
# Servers to always allow double puppeting from # Servers to always allow double puppeting from
double_puppet_server_map: double_puppet_server_map:
example.com: https://__BOTUSERS__ example.com: https://__SERVER_NAME__
# Allow using double puppeting from any server with a valid client .well-known file. # Allow using double puppeting from any server with a valid client .well-known file.
double_puppet_allow_discovery: false double_puppet_allow_discovery: false
# Shared secrets for https://github.com/devture/matrix-synapse-shared-secret-auth # Shared secrets for https://github.com/devture/matrix-synapse-shared-secret-auth
@ -146,7 +146,7 @@ bridge:
# application service. # application service.
encryption: encryption:
# Allow encryption, work in group chat rooms with e2ee enabled # Allow encryption, work in group chat rooms with e2ee enabled
allow: false allow: __ENCRYPTION__
# Default to encryption, force-enable encryption in all portals the bridge creates # Default to encryption, force-enable encryption in all portals the bridge creates
# This will cause the bridge bot to be in private chats for the encryption to work properly. # This will cause the bridge bot to be in private chats for the encryption to work properly.
default: false default: false

View file

@ -191,6 +191,7 @@ ynh_replace_string --match_string=__MAUTRIX_FACEBOOK_USER__ --replace_string=$ma
ynh_replace_string --match_string=__MAUTRIX_FACEBOOK_DB_PWD__ --replace_string=$mautrix_facebook_db_pwd --target_file="$mautrix_config_path" ynh_replace_string --match_string=__MAUTRIX_FACEBOOK_DB_PWD__ --replace_string=$mautrix_facebook_db_pwd --target_file="$mautrix_config_path"
ynh_replace_string --match_string=__MAUTRIX_FACEBOOK_DB_NAME__ --replace_string=$mautrix_facebook_db_name --target_file="$mautrix_config_path" ynh_replace_string --match_string=__MAUTRIX_FACEBOOK_DB_NAME__ --replace_string=$mautrix_facebook_db_name --target_file="$mautrix_config_path"
ynh_replace_string --match_string=__FACEBOOKBOT__ --replace_string=$facebookbot --target_file="$mautrix_config_path" ynh_replace_string --match_string=__FACEBOOKBOT__ --replace_string=$facebookbot --target_file="$mautrix_config_path"
ynh_replace_string --match_string=__ENCRYPTION__ --replace_string=$encryption --target_file="$mautrix_config_path"
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"