Skip to content

Add matrix_bridges_msc4190_enabled flag for using msc4190 on supported mautrix bridges. flag for using msc4190 on supported mautrix bridges. #4258

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Apr 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions roles/custom/matrix-base/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ matrix_bridges_encryption_enabled: false
# Global var to make encryption default/optional across all bridges with encryption support
matrix_bridges_encryption_default: "{{ matrix_bridges_encryption_enabled }}"

# Global var for enabling msc4190 ( On supported bridges)
matrix_bridges_msc4190_enabled: "{{ matrix_authentication_service_enabled and matrix_bridges_encryption_enabled and matrix_synapse_experimental_features_msc3202_device_masquerading_enabled }}"

# Global var to enable/disable relay mode across all bridges with relay mode support
matrix_bridges_relay_enabled: false

Expand Down
3 changes: 3 additions & 0 deletions roles/custom/matrix-bridge-mautrix-bluesky/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ matrix_mautrix_bluesky_homeserver_address: ""
matrix_mautrix_bluesky_homeserver_domain: '{{ matrix_domain }}'
matrix_mautrix_bluesky_appservice_address: 'http://matrix-mautrix-bluesky:29340'

matrix_mautrix_bluesky_msc4190_enabled: "{{ matrix_bridges_msc4190_enabled }}"

# A public address that external services can use to reach this appservice.
matrix_mautrix_bluesky_appservice_public_address: ''

Expand Down Expand Up @@ -187,6 +189,7 @@ matrix_mautrix_bluesky_registration_yaml: |
rate_limited: false
de.sorunome.msc2409.push_ephemeral: true
receive_ephemeral: true
io.element.msc4190: {{ matrix_mautrix_bluesky_msc4190_enabled | to_json }}

matrix_mautrix_bluesky_registration: "{{ matrix_mautrix_bluesky_registration_yaml | from_yaml }}"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,10 +209,6 @@ appservice:
# However, messages will not be guaranteed to be bridged in the same order they were sent in.
# This value doesn't affect the registration file.
async_transactions: false
# Whether to use MSC4190 instead of appservice login to create the bridge bot device.
# Requires the homeserver to support MSC4190 and the device masquerading parts of MSC3202.
# Only relevant when using end-to-bridge encryption, required when using encryption with next-gen auth (MSC3861).
msc4190: false

# Authentication tokens for AS <-> HS communication. Autogenerated; do not modify.
as_token: {{ matrix_mautrix_bluesky_appservice_token | to_json }}
Expand Down Expand Up @@ -358,6 +354,11 @@ encryption:
# Whether to use MSC2409/MSC3202 instead of /sync long polling for receiving encryption-related data.
# This option is not yet compatible with standard Matrix servers like Synapse and should not be used.
appservice: {{ matrix_mautrix_bluesky_bridge_encryption_appservice | to_json }}
# Whether to use MSC4190 instead of appservice login to create the bridge bot device.
# Requires the homeserver to support MSC4190 and the device masquerading parts of MSC3202.
# Only relevant when using end-to-bridge encryption, required when using encryption with next-gen auth (MSC3861).
# Changing this option requires updating the appservice registration file.
msc4190: {{ matrix_mautrix_bluesky_msc4190_enabled | to_json }}
# Enable key sharing? If enabled, key requests for rooms where users are in will be fulfilled.
# You must use a client that supports requesting keys from other users to use this feature.
allow_key_sharing: {{ matrix_mautrix_bluesky_bridge_encryption_key_sharing_allow | to_json }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ matrix_mautrix_gmessages_homeserver_address: ""
matrix_mautrix_gmessages_homeserver_domain: "{{ matrix_domain }}"
matrix_mautrix_gmessages_appservice_address: "http://matrix-mautrix-gmessages:8080"

matrix_mautrix_gmessages_msc4190_enabled: "{{ matrix_bridges_msc4190_enabled }}"

matrix_mautrix_gmessages_backfill_enabled: true
matrix_mautrix_gmessages_backfill_max_initial_messages: 50
matrix_mautrix_gmessages_backfill_max_catchup_messages: 500
Expand Down Expand Up @@ -212,5 +214,6 @@ matrix_mautrix_gmessages_registration_yaml: |
- exclusive: true
regex: '^@{{ matrix_mautrix_gmessages_appservice_bot_username | regex_escape }}:{{ matrix_mautrix_gmessages_homeserver_domain | regex_escape }}$'
de.sorunome.msc2409.push_ephemeral: true
io.element.msc4190: {{ matrix_mautrix_gmessages_msc4190_enabled | to_json }}

matrix_mautrix_gmessages_registration: "{{ matrix_mautrix_gmessages_registration_yaml | from_yaml }}"
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,11 @@ encryption:
# Whether to use MSC2409/MSC3202 instead of /sync long polling for receiving encryption-related data.
# This option is not yet compatible with standard Matrix servers like Synapse and should not be used.
appservice: {{ matrix_mautrix_gmessages_bridge_encryption_appservice | to_json }}
# Whether to use MSC4190 instead of appservice login to create the bridge bot device.
# Requires the homeserver to support MSC4190 and the device masquerading parts of MSC3202.
# Only relevant when using end-to-bridge encryption, required when using encryption with next-gen auth (MSC3861).
# Changing this option requires updating the appservice registration file.
msc4190: {{ matrix_mautrix_gmessages_msc4190_enabled | to_json }}
# Enable key sharing? If enabled, key requests for rooms where users are in will be fulfilled.
# You must use a client that supports requesting keys from other users to use this feature.
allow_key_sharing: {{ matrix_mautrix_gmessages_bridge_encryption_key_sharing_allow | to_json }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ matrix_mautrix_meta_instagram_appservice_address: "http://{{ matrix_mautrix_meta

matrix_mautrix_meta_instagram_appservice_id: "{{ matrix_mautrix_meta_instagram_meta_mode }}"

matrix_mautrix_meta_instagram_msc4190_enabled: "{{ matrix_bridges_msc4190_enabled }}"

# For Facebook/Messenger, we use the same `@messengerbot:example.com` username regardless of how bridging happens for multiple reasons:
# - it's consistent - regardless of how bridging happens, the bridged service is actually Messenger
# - it's easy for users - you may change the mode, but the bot is always at `@messengerbot:example.com`
Expand Down Expand Up @@ -297,5 +299,6 @@ matrix_mautrix_meta_instagram_registration_yaml: |
sender_localpart: _bot_{{ matrix_mautrix_meta_instagram_appservice_username }}
rate_limited: false
de.sorunome.msc2409.push_ephemeral: true
io.element.msc4190: {{ matrix_mautrix_meta_instagram_msc4190_enabled | to_json }}

matrix_mautrix_meta_instagram_registration: "{{ matrix_mautrix_meta_instagram_registration_yaml | from_yaml }}"
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,11 @@ encryption:
# Whether to use MSC2409/MSC3202 instead of /sync long polling for receiving encryption-related data.
# This option is not yet compatible with standard Matrix servers like Synapse and should not be used.
appservice: {{ matrix_mautrix_meta_instagram_bridge_encryption_appservice | to_json }}
# Whether to use MSC4190 instead of appservice login to create the bridge bot device.
# Requires the homeserver to support MSC4190 and the device masquerading parts of MSC3202.
# Only relevant when using end-to-bridge encryption, required when using encryption with next-gen auth (MSC3861).
# Changing this option requires updating the appservice registration file.
msc4190: {{ matrix_mautrix_meta_instagram_msc4190_enabled | to_json }}
# Enable key sharing? If enabled, key requests for rooms where users are in will be fulfilled.
# You must use a client that supports requesting keys from other users to use this feature.
allow_key_sharing: {{ matrix_mautrix_meta_instagram_bridge_encryption_allow_key_sharing | to_json }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ matrix_mautrix_meta_messenger_appservice_address: "http://{{ matrix_mautrix_meta

matrix_mautrix_meta_messenger_appservice_id: "{{ matrix_mautrix_meta_messenger_meta_mode }}"

matrix_mautrix_meta_messenger_msc4190_enabled: "{{ matrix_bridges_msc4190_enabled }}"

# For Facebook/Messenger, we use the same `@messengerbot:example.com` username regardless of how bridging happens for multiple reasons:
# - it's consistent - regardless of how bridging happens, the bridged service is actually Messenger
# - it's easy for users - you may change the mode, but the bot is always at `@messengerbot:example.com`
Expand Down Expand Up @@ -297,5 +299,6 @@ matrix_mautrix_meta_messenger_registration_yaml: |
sender_localpart: _bot_{{ matrix_mautrix_meta_messenger_appservice_username }}
rate_limited: false
de.sorunome.msc2409.push_ephemeral: true
io.element.msc4190: {{ matrix_mautrix_meta_messenger_msc4190_enabled | to_json }}

matrix_mautrix_meta_messenger_registration: "{{ matrix_mautrix_meta_messenger_registration_yaml | from_yaml }}"
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,11 @@ encryption:
# Whether to use MSC2409/MSC3202 instead of /sync long polling for receiving encryption-related data.
# This option is not yet compatible with standard Matrix servers like Synapse and should not be used.
appservice: {{ matrix_mautrix_meta_messenger_bridge_encryption_appservice | to_json }}
# Whether to use MSC4190 instead of appservice login to create the bridge bot device.
# Requires the homeserver to support MSC4190 and the device masquerading parts of MSC3202.
# Only relevant when using end-to-bridge encryption, required when using encryption with next-gen auth (MSC3861).
# Changing this option requires updating the appservice registration file.
msc4190: {{ matrix_mautrix_meta_messenger_msc4190_enabled | to_json }}
# Enable key sharing? If enabled, key requests for rooms where users are in will be fulfilled.
# You must use a client that supports requesting keys from other users to use this feature.
allow_key_sharing: {{ matrix_mautrix_meta_messenger_bridge_encryption_allow_key_sharing | to_json }}
Expand Down
3 changes: 3 additions & 0 deletions roles/custom/matrix-bridge-mautrix-signal/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ matrix_mautrix_signal_homeserver_address: ""
matrix_mautrix_signal_homeserver_domain: "{{ matrix_domain }}"
matrix_mautrix_signal_appservice_address: "http://matrix-mautrix-signal:8080"

matrix_mautrix_signal_msc4190_enabled: "{{ matrix_bridges_msc4190_enabled }}"

matrix_mautrix_signal_command_prefix: "!signal"

matrix_mautrix_signal_bridge_permissions: |
Expand Down Expand Up @@ -210,6 +212,7 @@ matrix_mautrix_signal_registration_yaml: |
- exclusive: true
regex: '^@{{ matrix_mautrix_signal_appservice_bot_username | regex_escape }}:{{ matrix_mautrix_signal_homeserver_domain | regex_escape }}$'
de.sorunome.msc2409.push_ephemeral: true
io.element.msc4190: {{ matrix_mautrix_signal_msc4190_enabled | to_json }}

matrix_mautrix_signal_registration: "{{ matrix_mautrix_signal_registration_yaml | from_yaml }}"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,11 @@ encryption:
# Whether to use MSC2409/MSC3202 instead of /sync long polling for receiving encryption-related data.
# This option is not yet compatible with standard Matrix servers like Synapse and should not be used.
appservice: false
# Whether to use MSC4190 instead of appservice login to create the bridge bot device.
# Requires the homeserver to support MSC4190 and the device masquerading parts of MSC3202.
# Only relevant when using end-to-bridge encryption, required when using encryption with next-gen auth (MSC3861).
# Changing this option requires updating the appservice registration file.
msc4190: {{ matrix_mautrix_signal_msc4190_enabled | to_json }}
# Enable key sharing? If enabled, key requests for rooms where users are in will be fulfilled.
# You must use a client that supports requesting keys from other users to use this feature.
allow_key_sharing: {{ matrix_mautrix_signal_bridge_encryption_key_sharing_allow | to_json }}
Expand Down
3 changes: 3 additions & 0 deletions roles/custom/matrix-bridge-mautrix-slack/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ matrix_mautrix_slack_homeserver_address: ""
matrix_mautrix_slack_homeserver_domain: "{{ matrix_domain }}"
matrix_mautrix_slack_appservice_address: "http://matrix-mautrix-slack:8080"

matrix_mautrix_slack_msc4190_enabled: "{{ matrix_bridges_msc4190_enabled }}"

matrix_mautrix_slack_command_prefix: "!slack"

matrix_mautrix_slack_bridge_permissions: |
Expand Down Expand Up @@ -151,6 +153,7 @@ matrix_mautrix_slack_registration_yaml: |
- exclusive: true
regex: '^@{{ matrix_mautrix_slack_appservice_bot_username | regex_escape }}:{{ matrix_mautrix_slack_homeserver_domain | regex_escape }}$'
de.sorunome.msc2409.push_ephemeral: true
io.element.msc4190: {{ matrix_mautrix_slack_msc4190_enabled | to_json }}

matrix_mautrix_slack_registration: "{{ matrix_mautrix_slack_registration_yaml | from_yaml }}"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,11 @@ encryption:
# Whether to use MSC2409/MSC3202 instead of /sync long polling for receiving encryption-related data.
# This option is not yet compatible with standard Matrix servers like Synapse and should not be used.
appservice: false
# Whether to use MSC4190 instead of appservice login to create the bridge bot device.
# Requires the homeserver to support MSC4190 and the device masquerading parts of MSC3202.
# Only relevant when using end-to-bridge encryption, required when using encryption with next-gen auth (MSC3861).
# Changing this option requires updating the appservice registration file.
msc4190: {{ matrix_mautrix_slack_msc4190_enabled | to_json }}
# Enable key sharing? If enabled, key requests for rooms where users are in will be fulfilled.
# You must use a client that supports requesting keys from other users to use this feature.
allow_key_sharing: {{ matrix_mautrix_slack_bridge_encryption_key_sharing_allow | to_json }}
Expand Down
3 changes: 3 additions & 0 deletions roles/custom/matrix-bridge-mautrix-telegram/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ matrix_mautrix_telegram_appservice_public_external: '{{ matrix_mautrix_telegram_

matrix_mautrix_telegram_appservice_bot_username: telegrambot

matrix_mautrix_telegram_msc4190_enabled: "{{ matrix_bridges_msc4190_enabled }}"

# Specifies the default log level for all bridge loggers.
matrix_mautrix_telegram_logging_level: WARNING

Expand Down Expand Up @@ -239,6 +241,7 @@ matrix_mautrix_telegram_registration_yaml: |
url: {{ matrix_mautrix_telegram_appservice_address }}
rate_limited: false
de.sorunome.msc2409.push_ephemeral: true
io.element.msc4190: {{ matrix_mautrix_telegram_msc4190_enabled | to_json }}

matrix_mautrix_telegram_registration: "{{ matrix_mautrix_telegram_registration_yaml | from_yaml }}"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,11 @@ bridge:
default: {{ matrix_mautrix_telegram_bridge_encryption_default|to_json }}
# Whether to use MSC2409/MSC3202 instead of /sync long polling for receiving encryption-related data.
appservice: false
# Whether to use MSC4190 instead of appservice login to create the bridge bot device.
# Requires the homeserver to support MSC4190 and the device masquerading parts of MSC3202.
# Only relevant when using end-to-bridge encryption, required when using encryption with next-gen auth (MSC3861).
# Changing this option requires updating the appservice registration file.
msc4190: {{ matrix_mautrix_telegram_msc4190_enabled | to_json }}
# Require encryption, drop any unencrypted messages.
require: false
# Enable key sharing? If enabled, key requests for rooms where users are in will be fulfilled.
Expand Down
3 changes: 3 additions & 0 deletions roles/custom/matrix-bridge-mautrix-twitter/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ matrix_mautrix_twitter_homeserver_address: ""
matrix_mautrix_twitter_homeserver_domain: '{{ matrix_domain }}'
matrix_mautrix_twitter_appservice_address: 'http://matrix-mautrix-twitter:29327'

matrix_mautrix_twitter_msc4190_enabled: "{{ matrix_bridges_msc4190_enabled }}"

# A public address that external services can use to reach this appservice.
matrix_mautrix_twitter_appservice_public_address: ''

Expand Down Expand Up @@ -196,6 +198,7 @@ matrix_mautrix_twitter_registration_yaml: |
rate_limited: false
de.sorunome.msc2409.push_ephemeral: true
receive_ephemeral: true
io.element.msc4190: {{ matrix_mautrix_twitter_msc4190_enabled | to_json }}

matrix_mautrix_twitter_registration: "{{ matrix_mautrix_twitter_registration_yaml | from_yaml }}"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,8 @@ appservice:
# Whether to use MSC4190 instead of appservice login to create the bridge bot device.
# Requires the homeserver to support MSC4190 and the device masquerading parts of MSC3202.
# Only relevant when using end-to-bridge encryption, required when using encryption with next-gen auth (MSC3861).
msc4190: false
# Changing this option requires updating the appservice registration file.
msc4190: {{ matrix_mautrix_twitter_msc4190_enabled | to_json }}

# Authentication tokens for AS <-> HS communication. Autogenerated; do not modify.
as_token: {{ matrix_mautrix_twitter_appservice_token | to_json }}
Expand Down
3 changes: 3 additions & 0 deletions roles/custom/matrix-bridge-mautrix-whatsapp/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ matrix_mautrix_whatsapp_homeserver_address: ""
matrix_mautrix_whatsapp_homeserver_domain: "{{ matrix_domain }}"
matrix_mautrix_whatsapp_appservice_address: "http://matrix-mautrix-whatsapp:8080"

matrix_mautrix_whatsapp_msc4190_enabled: "{{ matrix_bridges_msc4190_enabled }}"

matrix_mautrix_whatsapp_extev_polls: false

matrix_mautrix_whatsapp_command_prefix: "!wa"
Expand Down Expand Up @@ -229,5 +231,6 @@ matrix_mautrix_whatsapp_registration_yaml: |
- exclusive: true
regex: '^@{{ matrix_mautrix_whatsapp_appservice_bot_username | regex_escape }}:{{ matrix_mautrix_whatsapp_homeserver_domain | regex_escape }}$'
de.sorunome.msc2409.push_ephemeral: true
io.element.msc4190: {{ matrix_mautrix_whatsapp_msc4190_enabled | to_json }}

matrix_mautrix_whatsapp_registration: "{{ matrix_mautrix_whatsapp_registration_yaml | from_yaml }}"
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,11 @@ encryption:
# Whether to use MSC2409/MSC3202 instead of /sync long polling for receiving encryption-related data.
# This option is not yet compatible with standard Matrix servers like Synapse and should not be used.
appservice: false
# Whether to use MSC4190 instead of appservice login to create the bridge bot device.
# Requires the homeserver to support MSC4190 and the device masquerading parts of MSC3202.
# Only relevant when using end-to-bridge encryption, required when using encryption with next-gen auth (MSC3861).
# Changing this option requires updating the appservice registration file.
msc4190: {{ matrix_mautrix_whatsapp_msc4190_enabled | to_json }}
# Enable key sharing? If enabled, key requests for rooms where users are in will be fulfilled.
# You must use a client that supports requesting keys from other users to use this feature.
allow_key_sharing: {{ matrix_mautrix_whatsapp_bridge_encryption_key_sharing_allow | to_json }}
Expand Down
Loading