From 2fa82b8bca4f18e4aa392c5fd3c5516d76e90b87 Mon Sep 17 00:00:00 2001 From: Slavi Pantaleev Date: Sun, 18 Feb 2024 07:50:57 +0200 Subject: [PATCH] Disable media_patterns for mautrix-discord Media didn't work before this patch, likely because this feature is broken: > N.B. Discord now requires signed expiring download links, which means this solution no longer works. In the future, a more dynamic solution may be implemented where requests go to the bridge and the bridge and the bridge refetches the message if necessary. Source: https://docs.mau.fi/bridges/go/discord/direct-media.html Moreover, most users more likely don't want this behavior and would prefer to keep a complete mirror of the media on Matrix, instead of going through two 3rd party servers to fetch the media on demand. The default config for the bridge (https://github.com/mautrix/discord/blob/main/example-config.yaml) actually does not enable it. It seems like 4ed522e8fefff632523d68c7d2f2f9a6d86e3b1b (https://github.com/spantaleev/matrix-docker-ansible-deploy/pull/3133) lied to us as to what upstream does. Poor PR review lead to this anti-feature making it into the playbook. --- .../matrix-bridge-mautrix-discord/templates/config.yaml.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/custom/matrix-bridge-mautrix-discord/templates/config.yaml.j2 b/roles/custom/matrix-bridge-mautrix-discord/templates/config.yaml.j2 index 561a9c3c7..56c3bcfb8 100644 --- a/roles/custom/matrix-bridge-mautrix-discord/templates/config.yaml.j2 +++ b/roles/custom/matrix-bridge-mautrix-discord/templates/config.yaml.j2 @@ -149,7 +149,7 @@ bridge: # More details can be found at https://docs.mau.fi/bridges/go/discord/direct-media.html media_patterns: # Should custom mxc:// URIs be used instead of reuploading media? - enabled: true + enabled: false # Pattern for normal message attachments. attachments: {% raw %}mxc://discord-media.mau.dev/attachments|{{.ChannelID}}|{{.AttachmentID}}|{{.FileName}}{% endraw %} # Pattern for custom emojis.