Resolved server_map

This commit is contained in:
iucca 2021-11-16 13:37:11 +01:00
parent e216508774
commit b272e6147a
2 changed files with 4 additions and 16 deletions

View File

@ -74,6 +74,7 @@ matrix_mautrix_whatsapp_appservice_database_uri: "{{
# Can be set to enable automatic double-puppeting via Shared Secret Auth (https://github.com/devture/matrix-synapse-shared-secret-auth). # Can be set to enable automatic double-puppeting via Shared Secret Auth (https://github.com/devture/matrix-synapse-shared-secret-auth).
matrix_mautrix_whatsapp_login_shared_secret: '' matrix_mautrix_whatsapp_login_shared_secret: ''
matrix_mautrix_whatsapp_login_shared_secret_map: "{{ {matrix_mautrix_whatsapp_homeserver_domain: matrix_mautrix_whatsapp_login_shared_secret} if matrix_mautrix_whatsapp_login_shared_secret else {} }}"
# Default mautrix-whatsapp configuration template which covers the generic use case. # Default mautrix-whatsapp configuration template which covers the generic use case.
# You can customize it by controlling the various variables inside it. # You can customize it by controlling the various variables inside it.

View File

@ -15,11 +15,9 @@ homeserver:
appservice: appservice:
# The address that the homeserver can use to connect to this appservice. # The address that the homeserver can use to connect to this appservice.
address: {{ matrix_mautrix_whatsapp_appservice_address }} address: {{ matrix_mautrix_whatsapp_appservice_address }}
# The hostname and port where this appservice should listen. # The hostname and port where this appservice should listen.
hostname: 0.0.0.0 hostname: 0.0.0.0
port: 8080 port: 8080
# Database config. # Database config.
database: database:
# The database type. "sqlite3" and "postgres" are supported. # The database type. "sqlite3" and "postgres" are supported.
@ -31,7 +29,6 @@ appservice:
# Maximum number of connections. Mostly relevant for Postgres. # Maximum number of connections. Mostly relevant for Postgres.
max_open_conns: 20 max_open_conns: 20
max_idle_conns: 2 max_idle_conns: 2
# The unique ID of this appservice. # The unique ID of this appservice.
id: whatsapp id: whatsapp
# Appservice bot details. # Appservice bot details.
@ -42,7 +39,6 @@ appservice:
# to leave display name/avatar as-is. # to leave display name/avatar as-is.
displayname: WhatsApp bridge bot displayname: WhatsApp bridge bot
avatar: mxc://maunium.net/NeXNQarUbrlYBiPCpprYsRqr avatar: mxc://maunium.net/NeXNQarUbrlYBiPCpprYsRqr
# Authentication tokens for AS <-> HS communication. Autogenerated; do not modify. # Authentication tokens for AS <-> HS communication. Autogenerated; do not modify.
as_token: "{{ matrix_mautrix_whatsapp_appservice_token }}" as_token: "{{ matrix_mautrix_whatsapp_appservice_token }}"
hs_token: "{{ matrix_mautrix_whatsapp_homeserver_token }}" hs_token: "{{ matrix_mautrix_whatsapp_homeserver_token }}"
@ -53,7 +49,6 @@ bridge:
# {{ '{{.}}' }} is replaced with the phone number of the WhatsApp user. # {{ '{{.}}' }} is replaced with the phone number of the WhatsApp user.
username_template: "{{ 'whatsapp_{{.}}' }}" username_template: "{{ 'whatsapp_{{.}}' }}"
displayname_template: "{{ '{{if .PushName}}{{.PushName}}{{else if .BusinessName}}{{.BusinessName}}{{else}}{{.JID}}{{end}} (WA)' }}" displayname_template: "{{ '{{if .PushName}}{{.PushName}}{{else if .BusinessName}}{{.BusinessName}}{{else}}{{.JID}}{{end}} (WA)' }}"
# Should the bridge send a read receipt from the bridge bot when a message has been sent to WhatsApp? # Should the bridge send a read receipt from the bridge bot when a message has been sent to WhatsApp?
delivery_receipts: false delivery_receipts: false
# Should incoming calls send a message to the Matrix room? # Should incoming calls send a message to the Matrix room?
@ -62,9 +57,7 @@ bridge:
identity_change_notices: false identity_change_notices: false
# Should a "reactions not yet supported" warning be sent to the Matrix room when a user reacts to a message? # Should a "reactions not yet supported" warning be sent to the Matrix room when a user reacts to a message?
reaction_notices: true reaction_notices: true
portal_message_buffer: 128 portal_message_buffer: 128
# Settings for handling history sync payloads. These settings only apply right after login, # Settings for handling history sync payloads. These settings only apply right after login,
# because the phone only sends the history sync data once, and there's no way to re-request it # because the phone only sends the history sync data once, and there's no way to re-request it
# (other than logging out and back in again). # (other than logging out and back in again).
@ -87,12 +80,9 @@ bridge:
# Should the bridge request a full sync from the phone when logging in? # Should the bridge request a full sync from the phone when logging in?
# This bumps the size of history syncs from 3 months to 1 year. # This bumps the size of history syncs from 3 months to 1 year.
request_full_sync: false request_full_sync: false
user_avatar_sync: true user_avatar_sync: true
# Should Matrix users leaving groups be bridged to WhatsApp? # Should Matrix users leaving groups be bridged to WhatsApp?
bridge_matrix_leave: true bridge_matrix_leave: true
# Should the bridge sync with double puppeting to receive EDUs that aren't normally sent to appservices. # Should the bridge sync with double puppeting to receive EDUs that aren't normally sent to appservices.
sync_with_custom_puppets: true sync_with_custom_puppets: true
# Should the bridge update the m.direct account data event when double puppeting is enabled. # Should the bridge update the m.direct account data event when double puppeting is enabled.
@ -105,8 +95,8 @@ bridge:
default_bridge_receipts: true default_bridge_receipts: true
default_bridge_presence: true default_bridge_presence: true
# Servers to always allow double puppeting from # Servers to always allow double puppeting from
double_puppet_server_map: "{{ matrix_domain }}" double_puppet_server_map:
"{{ matrix_mautrix_whatsapp_homeserver_domain }}": {{ matrix_mautrix_whatsapp_homeserver_address }}
# Allow using double puppeting from any server with a valid client .well-known file. # Allow using double puppeting from any server with a valid client .well-known file.
double_puppet_allow_discovery: false double_puppet_allow_discovery: false
# Shared secrets for https://github.com/devture/matrix-synapse-shared-secret-auth # Shared secrets for https://github.com/devture/matrix-synapse-shared-secret-auth
@ -114,10 +104,7 @@ bridge:
# If set, double puppeting will be enabled automatically for local users # If set, double puppeting will be enabled automatically for local users
# instead of users having to find an access token and run `login-matrix` # instead of users having to find an access token and run `login-matrix`
# manually. # manually.
login_shared_secret_map: login_shared_secret_map: {{ matrix_mautrix_whatsapp_login_shared_secret_map|to_json }}
"{{ matrix_mautrix_whatsapp_homeserver_domain }}": {{ matrix_mautrix_whatsapp_login_shared_secret|to_json }}
# Should the bridge explicitly set the avatar and room name for private chat portal rooms? # Should the bridge explicitly set the avatar and room name for private chat portal rooms?
private_chat_portal_meta: false private_chat_portal_meta: false
# Should Matrix m.notice-type messages be bridged? # Should Matrix m.notice-type messages be bridged?