From 911031e2cf69e9eed06b0394d24421a54abca08b Mon Sep 17 00:00:00 2001 From: Slavi Pantaleev Date: Tue, 20 Jan 2026 16:10:30 +0200 Subject: [PATCH] Add support for Hookshot static connections (new in v7.3.0) This adds the matrix_hookshot_connections variable for configuring static webhook connections via the config file. See: https://github.com/matrix-org/matrix-hookshot/pull/1102 --- .../custom/matrix-bridge-hookshot/defaults/main.yml | 12 ++++++++++++ .../matrix-bridge-hookshot/templates/config.yaml.j2 | 1 + 2 files changed, 13 insertions(+) diff --git a/roles/custom/matrix-bridge-hookshot/defaults/main.yml b/roles/custom/matrix-bridge-hookshot/defaults/main.yml index 8cd50cc31..1a9075818 100644 --- a/roles/custom/matrix-bridge-hookshot/defaults/main.yml +++ b/roles/custom/matrix-bridge-hookshot/defaults/main.yml @@ -242,6 +242,18 @@ matrix_hookshot_widgets_branding_widgetTitle: "Hookshot Configuration" # noqa # level: admin matrix_hookshot_permissions: [] +# Static connections that can be configured by an administrator, as documented here: +# https://matrix-org.github.io/matrix-hookshot/latest/usage/static_connections.html +# Currently only generic webhooks are supported. +# Example: +# matrix_hookshot_connections: +# - connectionType: uk.half-shot.matrix-hookshot.generic.hook +# stateKey: my-unique-webhook-id +# roomId: "!room-id" +# state: +# name: My Static Webhook +matrix_hookshot_connections: [] + matrix_hookshot_bot_displayname: Hookshot Bot matrix_hookshot_bot_avatar: 'mxc://half-shot.uk/2876e89ccade4cb615e210c458e2a7a6883fe17d' diff --git a/roles/custom/matrix-bridge-hookshot/templates/config.yaml.j2 b/roles/custom/matrix-bridge-hookshot/templates/config.yaml.j2 index 0e993f9d0..4fe504d7e 100644 --- a/roles/custom/matrix-bridge-hookshot/templates/config.yaml.j2 +++ b/roles/custom/matrix-bridge-hookshot/templates/config.yaml.j2 @@ -137,6 +137,7 @@ widgets: {% if matrix_hookshot_permissions %} permissions: {{ matrix_hookshot_permissions | to_json }} {% endif %} +connections: {{ matrix_hookshot_connections | to_json }} listeners: # (Optional) HTTP Listener configuration. # Bind resource endpoints to ports and addresses.