nixpkgs/nixos/modules/services/matrix
Maximilian Bosch 8a3c21bd82
nixos/matrix-synapse: fix type of settings.url_preview_url_blacklist
Actually, it's supposed to be `listOf (attrsOf str)` because each
list-item can match against multiple properties from `urlsplit`[1]. In
fact, `listOf str` breaks URL previews at runtime:

    Sep 14 15:03:47 soost synapse[1100355]: synapse.http.server: [GET-116] Failed handle request via 'PreviewUrlResource': <XForwardedForRequest at 0x7f691bd5f730 method='GET' uri='/_matrix/media/r0/preview_url?url=<redacted>' clientproto='HTTP/1.1' site='8448'>
                                            Traceback (most recent call last):
                                              [...]
                                              File "/nix/store/xk5yksbw09p6qwk0maq2cb2in3z6f4gn-matrix-synapse-1.91.2/lib/python3.10/site-packages/synapse/media/url_previewer.py", line 398, in _is_url_blocked
                                                for attrib, pattern in entry.items():
                                            AttributeError: 'str' object has no attribute 'items'

To make sure that people aren't confused when upgrading their configs, I
decided to work with `types.coercedTo` to "pretend" accepting the old
type signature, but then throwing an error explaining what to do (and
rejecting the broken configuration).

[1] https://docs.python.org/3/library/urllib.parse.html#urllib.parse.urlsplit
2023-09-14 17:32:26 +02:00
..
appservice-discord.nix nixos/appservice-discord: customizable package 2023-02-11 01:08:46 +08:00
appservice-irc.nix matrix-appservice-irc: 0.38.0 -> 1.0.1 2023-07-31 11:19:42 +02:00
conduit.nix nixos/conduit: disable update checks by default 2023-08-10 23:16:19 -07:00
dendrite.nix dendrite: 0.11.0 -> 0.12.0 2023-03-18 15:35:47 +01:00
matrix-sliding-sync.nix nixos/matrix-sliding-sync: init 2023-07-19 23:59:25 +02:00
mautrix-facebook.nix nixos.mautrix-facebook: Fix appservice name 2023-05-26 12:39:37 -04:00
mautrix-telegram.nix nixos/mautrix-telegram: drop removed --base-config flag 2023-09-03 08:59:57 -04:00
mautrix-whatsapp.nix nixos/mautrix-whatsapp: log to the journal only 2023-09-04 01:20:17 +02:00
mjolnir.md nixos/mjolnir: convert manual chapter to MD 2023-01-10 10:31:56 +01:00
mjolnir.nix nixos/mjolnir: explicitly set --mjolnir-config 2023-05-15 18:40:57 +08:00
mx-puppet-discord.nix nixos/mx-puppet-discord: move into matrix category 2023-01-16 06:23:25 +00:00
pantalaimon-options.nix
pantalaimon.nix
synapse-log_config.yaml
synapse.md nixos/matrix-synapse: set public baseurl in example config 2023-08-05 16:08:35 -04:00
synapse.nix nixos/matrix-synapse: fix type of settings.url_preview_url_blacklist 2023-09-14 17:32:26 +02:00