Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Dendrite #69

Open
Delegator9176 opened this issue Nov 21, 2022 · 2 comments
Open

Support for Dendrite #69

Delegator9176 opened this issue Nov 21, 2022 · 2 comments
Labels
enhancement New feature or request install script Has to do with the install and restore scripts manifest Has to do with the app manifest

Comments

@Delegator9176
Copy link

I tried to install the app along with dendrite but it didn't work.
Any chance that the Mautrix-Framework works with Dendrite, or what do I need to do to get it working?

Thanks in advance :)

@MayeulC
Copy link
Collaborator

MayeulC commented Nov 23, 2022

Well, I think Dendrite is advanced enough to support it now.

That part of the bridge needs to be overhauled, so that a user may select any synapse or dendrite instance when installing the bridge (for now it asks the synapse instance number):

# ToDo check (in manifest?) if the selected synapse instance is not already connected to a mautrix_bridge bridge
if [ $synapsenumber -eq "1" ]
then
synapse_instance="synapse"
else
synapse_instance="synapse__$synapsenumber"
fi
server_name=$(ynh_app_setting_get --app $synapse_instance --key server_name)
domain=$(ynh_app_setting_get --app $synapse_instance --key domain)
mautrix_version=$(ynh_app_upstream_version)
enable_relaybot=true
bot_synapse_db_user="@$botname:$server_name"
synapse_db_name="matrix_$synapse_instance"
signald_user="signald" # This is actually chosen by the signald dependency

"name": "synapsenumber",
"type": "string",
"ask": {
"en": "Choose the local synapse instance number to communicate with mautrix_signal",
"fr": "Choisissez le numéro de l'instance synapse qui doit communiquer avec mautrix_signal"
},
"example": "2 (for instance synapse__2)",
"help": {
"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."
},
"default": "1"
},

Ideally, we would also upgrade to the new manifest as well.

Then, registration should be adapted according to the docs:

ynh_script_progression --message="Registering Synapse app-service" --weight=1
$final_path/bin/python3 -m mautrix_signal -g -c $final_path/config.yaml -r /etc/matrix-$synapse_instance/app-service/$app.yaml
/opt/yunohost/matrix-$synapse_instance/update_synapse_for_appservice.sh || ynh_die --message="Synapse can't restart with the appservice configuration"
chown -R $app:$app "$final_path"
ynh_store_file_checksum --file="/etc/matrix-$synapse_instance/app-service/$app.yaml"
ynh_store_file_checksum --file="$final_path/config.yaml"

All in all, not a lot of work, but a lot of testing, especially if we want to get this right and not pile another layer of hacks in the install script.

@MayeulC MayeulC added enhancement New feature or request manifest Has to do with the app manifest install script Has to do with the install and restore scripts labels Nov 23, 2022
@Delegator9176
Copy link
Author

That would be great. As for testing, I'm happy to support that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request install script Has to do with the install and restore scripts manifest Has to do with the app manifest
Projects
None yet
Development

No branches or pull requests

2 participants