Open nickypro opened 2 years ago
Thanks for confirming that these bridges work!
Right now, bridges use an init task (roles/SOME_BRIDGE/tasks/init.yml
) to dynamically inject themselves into Synapse configuration and volumes when the given bridge is enabled.
We either need to copy/paste these tasks and do the same for Dendrite after adjusting some variable names:
matrix_synapse_container_extra_arguments
-> matrix_dendrite_container_extra_arguments
matrix_synapse_app_service_config_files
-> matrix_dendrite_app_service_config_files
.. or we should make roles inject themselves into more generic variables (e.g. matrix_homeserver_container_extra_arguments
or matrix_homeserver_additional_volumes
; matrix_homeserver_app_service_config_files
). These variables can later get passed along to all homeserver implementations.
This 2nd way of doing things will let us more easily add new homeserver implementations, without having to copy/paste init.yaml
tasks again.. However, I'm not sure if the "appservice registration" YAML thing is spec-ed and compatible between homeserver implementations.
Looks like Dendrite handles appservice configuration files differently. We should likely report this upstream at the Dendrite repository, so they can make things easier for people. Alternatively (or additionally), we can also add some if
statements to the appservice configuration to make it not add these incompatible options for other homeserver implementations: https://github.com/spantaleev/matrix-docker-ansible-deploy/blob/e0df99a7de66e0fec8ba131605f3a39e60c51cd4/roles/matrix-bridge-mautrix-facebook/defaults/main.yml#L99-L113
Example:
{% if matrix_homeserver_implementation == 'synapse' %}
de.sorunome.msc2409.push_ephemeral: true
{% endif %}
(we should be careful with indentation here)
Looks like the last issue is mentioned here: https://github.com/matrix-org/dendrite/issues/1567
not sure if they have a decision on how best to handle unknown options other than to give an error, so likely the if
option would be better
FYI, https://github.com/matrix-org/dendrite/issues/1567 has just been closed.
Yep, this should be fixed with the next release of dendrite!
bump! @spantaleev 's solution of copy-pasting variables works on the latest version. At least for WhatsApp.
- ansible.builtin.set_fact:
matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-mautrix-whatsapp.service'] }}"
when: matrix_mautrix_whatsapp_enabled | bool
- ansible.builtin.set_fact:
# If the matrix-synapse role is not used, these variables may not exist.
matrix_synapse_container_extra_arguments: >
{{
matrix_synapse_container_extra_arguments | default([])
+
["--mount type=bind,src={{ matrix_mautrix_whatsapp_config_path }}/registration.yaml,dst=/matrix-mautrix-whatsapp-registration.yaml,ro"]
}}
matrix_synapse_app_service_config_files: >
{{
matrix_synapse_app_service_config_files | default([])
+
["/matrix-mautrix-whatsapp-registration.yaml"]
}}
# If the matrix-dendrite role is not used, these variables may not exist.
matrix_dendrite_container_extra_arguments: >
{{
matrix_dendrite_container_extra_arguments | default([])
+
["--mount type=bind,src={{ matrix_mautrix_whatsapp_config_path }}/registration.yaml,dst=/matrix-mautrix-whatsapp-registration.yaml,ro"]
}}
matrix_dendrite_app_service_config_files: >
{{
matrix_dendrite_app_service_config_files | default([])
+
["/matrix-mautrix-whatsapp-registration.yaml"]
}}
when: matrix_mautrix_whatsapp_enabled | bool
Maybe I should PR this?
Has anyone tried setting up other mautrix bridges with the latest dendrite release?
Maybe we can go ahead with setting up the generic variables to avoid duplication until we come across a homeserver implementation that breaks with the common values?
PRing support for Facebook, Telegram, WhatsApp and Discord (without DMs) @shalzz https://github.com/spantaleev/matrix-docker-ansible-deploy/pull/2044
Is bridging still generally an issue with Dendrite? I'm thinking of switching over to Dendrite to save memory resources, but don't want to go through the trouble if the bridges aren't very reliable yet.
I have had some bridges work with dendrite. Mautrix-WhatsApp definitely does.
Hi All, there is a small issue when setting up the mautrix bridges with dendrite there is a couple of issues ( tested only with mautrix-facebook and mautrix-whatsapp so far ). I don't have any experience with ansible, but was able to find out how to modify the config files to work. I may fix this when I have time though if anyone else has experience with ansible they could probably do it quicker.
matrix-dendrite
container as far as I can see. ( I worked around this by hard linking the registration files to/matrix/dendrite/config
). It seems they are usually attached individually by as a docker volume in synapse.config-files
. it has an empty list[]
value, but mine now looks like this ( in synapse there is no/data
part ):de.sorunome.msc2409.push_ephemeral: true
option in the registration filesThe bridges seem to work so far with these parameters, though I haven't done much testing yet. I think these configurations should work with the ansible configuration as well.