Skip to content

Commit 6fdc712

Browse files
committed
Add matrix_bridges_msc4190_enabled flag for using msc4190 on supported mautrix bridges.
1 parent c4da60c commit 6fdc712

File tree

17 files changed

+64
-5
lines changed

17 files changed

+64
-5
lines changed

roles/custom/matrix-base/defaults/main.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ matrix_bridges_encryption_enabled: false
4848
# Global var to make encryption default/optional across all bridges with encryption support
4949
matrix_bridges_encryption_default: "{{ matrix_bridges_encryption_enabled }}"
5050

51+
# Global var for enabling msc4190 ( On supported bridges)
52+
matrix_bridges_msc4190_enabled: "{{ matrix_authentication_service_enabled && matrix_bridges_encryption_enabled }}"
53+
5154
# Global var to enable/disable relay mode across all bridges with relay mode support
5255
matrix_bridges_relay_enabled: false
5356

roles/custom/matrix-bridge-mautrix-bluesky/defaults/main.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ matrix_mautrix_bluesky_homeserver_address: ""
3131
matrix_mautrix_bluesky_homeserver_domain: '{{ matrix_domain }}'
3232
matrix_mautrix_bluesky_appservice_address: 'http://matrix-mautrix-bluesky:29340'
3333

34+
matrix_mautrix_bluesky_msc4190_enabled: "{{ matrix_bridges_msc4190_enabled }}"
35+
3436
# A public address that external services can use to reach this appservice.
3537
matrix_mautrix_bluesky_appservice_public_address: ''
3638

@@ -187,6 +189,7 @@ matrix_mautrix_bluesky_registration_yaml: |
187189
rate_limited: false
188190
de.sorunome.msc2409.push_ephemeral: true
189191
receive_ephemeral: true
192+
io.element.msc4190: {{ matrix_mautrix_bluesky_msc4190_enabled }}
190193

191194
matrix_mautrix_bluesky_registration: "{{ matrix_mautrix_bluesky_registration_yaml | from_yaml }}"
192195

roles/custom/matrix-bridge-mautrix-bluesky/templates/config.yaml.j2

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -209,10 +209,6 @@ appservice:
209209
# However, messages will not be guaranteed to be bridged in the same order they were sent in.
210210
# This value doesn't affect the registration file.
211211
async_transactions: false
212-
# Whether to use MSC4190 instead of appservice login to create the bridge bot device.
213-
# Requires the homeserver to support MSC4190 and the device masquerading parts of MSC3202.
214-
# Only relevant when using end-to-bridge encryption, required when using encryption with next-gen auth (MSC3861).
215-
msc4190: false
216212

217213
# Authentication tokens for AS <-> HS communication. Autogenerated; do not modify.
218214
as_token: {{ matrix_mautrix_bluesky_appservice_token | to_json }}
@@ -358,6 +354,11 @@ encryption:
358354
# Whether to use MSC2409/MSC3202 instead of /sync long polling for receiving encryption-related data.
359355
# This option is not yet compatible with standard Matrix servers like Synapse and should not be used.
360356
appservice: {{ matrix_mautrix_bluesky_bridge_encryption_appservice | to_json }}
357+
# Whether to use MSC4190 instead of appservice login to create the bridge bot device.
358+
# Requires the homeserver to support MSC4190 and the device masquerading parts of MSC3202.
359+
# Only relevant when using end-to-bridge encryption, required when using encryption with next-gen auth (MSC3861).
360+
# Changing this option requires updating the appservice registration file.
361+
msc4190: {{ matrix_mautrix_bluesky_msc4190_enabled }}
361362
# Enable key sharing? If enabled, key requests for rooms where users are in will be fulfilled.
362363
# You must use a client that supports requesting keys from other users to use this feature.
363364
allow_key_sharing: {{ matrix_mautrix_bluesky_bridge_encryption_key_sharing_allow | to_json }}

roles/custom/matrix-bridge-mautrix-gmessages/defaults/main.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ matrix_mautrix_gmessages_homeserver_address: ""
3636
matrix_mautrix_gmessages_homeserver_domain: "{{ matrix_domain }}"
3737
matrix_mautrix_gmessages_appservice_address: "http://matrix-mautrix-gmessages:8080"
3838

39+
matrix_mautrix_gmessages_msc4190_enabled: "{{ matrix_bridges_msc4190_enabled }}"
40+
3941
matrix_mautrix_gmessages_backfill_enabled: true
4042
matrix_mautrix_gmessages_backfill_max_initial_messages: 50
4143
matrix_mautrix_gmessages_backfill_max_catchup_messages: 500
@@ -212,5 +214,6 @@ matrix_mautrix_gmessages_registration_yaml: |
212214
- exclusive: true
213215
regex: '^@{{ matrix_mautrix_gmessages_appservice_bot_username | regex_escape }}:{{ matrix_mautrix_gmessages_homeserver_domain | regex_escape }}$'
214216
de.sorunome.msc2409.push_ephemeral: true
217+
io.element.msc4190: {{ matrix_mautrix_gmessages_msc4190_enabled }}
215218

216219
matrix_mautrix_gmessages_registration: "{{ matrix_mautrix_gmessages_registration_yaml | from_yaml }}"

roles/custom/matrix-bridge-mautrix-gmessages/templates/config.yaml.j2

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,11 @@ encryption:
354354
# Whether to use MSC2409/MSC3202 instead of /sync long polling for receiving encryption-related data.
355355
# This option is not yet compatible with standard Matrix servers like Synapse and should not be used.
356356
appservice: {{ matrix_mautrix_gmessages_bridge_encryption_appservice | to_json }}
357+
# Whether to use MSC4190 instead of appservice login to create the bridge bot device.
358+
# Requires the homeserver to support MSC4190 and the device masquerading parts of MSC3202.
359+
# Only relevant when using end-to-bridge encryption, required when using encryption with next-gen auth (MSC3861).
360+
# Changing this option requires updating the appservice registration file.
361+
msc4190: {{ matrix_mautrix_gmessages_msc4190_enabled }}
357362
# Enable key sharing? If enabled, key requests for rooms where users are in will be fulfilled.
358363
# You must use a client that supports requesting keys from other users to use this feature.
359364
allow_key_sharing: {{ matrix_mautrix_gmessages_bridge_encryption_key_sharing_allow | to_json }}

roles/custom/matrix-bridge-mautrix-meta-instagram/defaults/main.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,8 @@ matrix_mautrix_meta_instagram_appservice_address: "http://{{ matrix_mautrix_meta
123123

124124
matrix_mautrix_meta_instagram_appservice_id: "{{ matrix_mautrix_meta_instagram_meta_mode }}"
125125

126+
matrix_mautrix_meta_instagram_msc4190_enabled: "{{ matrix_bridges_msc4190_enabled }}"
127+
126128
# For Facebook/Messenger, we use the same `@messengerbot:example.com` username regardless of how bridging happens for multiple reasons:
127129
# - it's consistent - regardless of how bridging happens, the bridged service is actually Messenger
128130
# - it's easy for users - you may change the mode, but the bot is always at `@messengerbot:example.com`
@@ -297,5 +299,6 @@ matrix_mautrix_meta_instagram_registration_yaml: |
297299
sender_localpart: _bot_{{ matrix_mautrix_meta_instagram_appservice_username }}
298300
rate_limited: false
299301
de.sorunome.msc2409.push_ephemeral: true
302+
io.element.msc4190: {{ matrix_mautrix_meta_instagram_msc4190_enabled }}
300303
301304
matrix_mautrix_meta_instagram_registration: "{{ matrix_mautrix_meta_instagram_registration_yaml | from_yaml }}"

roles/custom/matrix-bridge-mautrix-meta-instagram/templates/config.yaml.j2

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,11 @@ encryption:
367367
# Whether to use MSC2409/MSC3202 instead of /sync long polling for receiving encryption-related data.
368368
# This option is not yet compatible with standard Matrix servers like Synapse and should not be used.
369369
appservice: {{ matrix_mautrix_meta_instagram_bridge_encryption_appservice | to_json }}
370+
# Whether to use MSC4190 instead of appservice login to create the bridge bot device.
371+
# Requires the homeserver to support MSC4190 and the device masquerading parts of MSC3202.
372+
# Only relevant when using end-to-bridge encryption, required when using encryption with next-gen auth (MSC3861).
373+
# Changing this option requires updating the appservice registration file.
374+
msc4190: {{ matrix_mautrix_meta_instagram_msc4190_enabled }}
370375
# Enable key sharing? If enabled, key requests for rooms where users are in will be fulfilled.
371376
# You must use a client that supports requesting keys from other users to use this feature.
372377
allow_key_sharing: {{ matrix_mautrix_meta_instagram_bridge_encryption_allow_key_sharing | to_json }}

roles/custom/matrix-bridge-mautrix-meta-messenger/defaults/main.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,8 @@ matrix_mautrix_meta_messenger_appservice_address: "http://{{ matrix_mautrix_meta
123123

124124
matrix_mautrix_meta_messenger_appservice_id: "{{ matrix_mautrix_meta_messenger_meta_mode }}"
125125

126+
matrix_mautrix_meta_messenger_msc4190_enabled: "{{ matrix_bridges_msc4190_enabled }}"
127+
126128
# For Facebook/Messenger, we use the same `@messengerbot:example.com` username regardless of how bridging happens for multiple reasons:
127129
# - it's consistent - regardless of how bridging happens, the bridged service is actually Messenger
128130
# - it's easy for users - you may change the mode, but the bot is always at `@messengerbot:example.com`
@@ -297,5 +299,6 @@ matrix_mautrix_meta_messenger_registration_yaml: |
297299
sender_localpart: _bot_{{ matrix_mautrix_meta_messenger_appservice_username }}
298300
rate_limited: false
299301
de.sorunome.msc2409.push_ephemeral: true
302+
io.element.msc4190: {{ matrix_mautrix_meta_messenger_msc4190_enabled }}
300303
301304
matrix_mautrix_meta_messenger_registration: "{{ matrix_mautrix_meta_messenger_registration_yaml | from_yaml }}"

roles/custom/matrix-bridge-mautrix-meta-messenger/templates/config.yaml.j2

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,11 @@ encryption:
367367
# Whether to use MSC2409/MSC3202 instead of /sync long polling for receiving encryption-related data.
368368
# This option is not yet compatible with standard Matrix servers like Synapse and should not be used.
369369
appservice: {{ matrix_mautrix_meta_messenger_bridge_encryption_appservice | to_json }}
370+
# Whether to use MSC4190 instead of appservice login to create the bridge bot device.
371+
# Requires the homeserver to support MSC4190 and the device masquerading parts of MSC3202.
372+
# Only relevant when using end-to-bridge encryption, required when using encryption with next-gen auth (MSC3861).
373+
# Changing this option requires updating the appservice registration file.
374+
msc4190: {{ matrix_mautrix_meta_messenger_msc4190_enabled }}
370375
# Enable key sharing? If enabled, key requests for rooms where users are in will be fulfilled.
371376
# You must use a client that supports requesting keys from other users to use this feature.
372377
allow_key_sharing: {{ matrix_mautrix_meta_messenger_bridge_encryption_allow_key_sharing | to_json }}

roles/custom/matrix-bridge-mautrix-signal/defaults/main.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ matrix_mautrix_signal_homeserver_address: ""
4444
matrix_mautrix_signal_homeserver_domain: "{{ matrix_domain }}"
4545
matrix_mautrix_signal_appservice_address: "http://matrix-mautrix-signal:8080"
4646

47+
matrix_mautrix_signal_msc4190_enabled: "{{ matrix_bridges_msc4190_enabled }}"
48+
4749
matrix_mautrix_signal_command_prefix: "!signal"
4850

4951
matrix_mautrix_signal_bridge_permissions: |
@@ -210,6 +212,7 @@ matrix_mautrix_signal_registration_yaml: |
210212
- exclusive: true
211213
regex: '^@{{ matrix_mautrix_signal_appservice_bot_username | regex_escape }}:{{ matrix_mautrix_signal_homeserver_domain | regex_escape }}$'
212214
de.sorunome.msc2409.push_ephemeral: true
215+
io.element.msc4190: {{ matrix_mautrix_signal_msc4190_enabled }}
213216

214217
matrix_mautrix_signal_registration: "{{ matrix_mautrix_signal_registration_yaml | from_yaml }}"
215218

0 commit comments

Comments
 (0)