1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/mautrix_whatsapp_ynh.git synced 2024-09-03 19:46:01 +02:00

Add new config options from v.0.6.0

This commit is contained in:
Dante 2022-07-18 11:24:30 +01:00
parent 9564dbf50d
commit ead8659a17

View file

@ -1,4 +1,3 @@
# From v0.5.0 https://github.com/mautrix/whatsapp/blob/master/example-config.yaml
# Homeserver details. # Homeserver details.
homeserver: homeserver:
# The address that this appservice can use to connect to the homeserver. # The address that this appservice can use to connect to the homeserver.
@ -39,7 +38,7 @@ appservice:
# The database URI. # The database URI.
# SQLite: File name is enough. https://github.com/mattn/go-sqlite3#connection-string # SQLite: File name is enough. https://github.com/mattn/go-sqlite3#connection-string
# Postgres: Connection string. For example, postgres://user:password@host/database?sslmode=disable # Postgres: Connection string. For example, postgres://user:password@host/database?sslmode=disable
# To connect via Unix socket, use something like postgres:///dbname?host=/var/run/postgresql #uri: mautrix-whatsapp.db # To connect via Unix socket, use something like postgres:///dbname?host=/var/run/postgresql
uri: postgres://__APP__:__DB_PWD__@localhost:5432/__DB_NAME__ uri: postgres://__APP__:__DB_PWD__@localhost:5432/__DB_NAME__
# Maximum number of connections. Mostly relevant for Postgres. # Maximum number of connections. Mostly relevant for Postgres.
max_open_conns: 20 max_open_conns: 20
@ -102,7 +101,7 @@ bridge:
# The following variables are also available, but will cause problems on multi-user instances: # The following variables are also available, but will cause problems on multi-user instances:
# {{.FullName}} - full name from contact list # {{.FullName}} - full name from contact list
# {{.FirstName}} - first name from contact list # {{.FirstName}} - first name from contact list
displayname_template: "{{if .PushName}}{{.PushName}}{{else if .BusinessName}}{{.BusinessName}}{{else}}{{.JID}}{{end}} (WA)" displayname_template: "{{if .BusinessName}}{{.BusinessName}}{{else if .PushName}}{{.PushName}}{{else}}{{.JID}}{{end}} (WA)"
# Should the bridge create a space for each logged-in user and add bridged rooms to it? # Should the bridge create a space for each logged-in user and add bridged rooms to it?
# Users who logged in before turning this on should run `!wa sync space` to create and fill the space for the first time. # Users who logged in before turning this on should run `!wa sync space` to create and fill the space for the first time.
personal_filtering_spaces: false personal_filtering_spaces: false
@ -285,6 +284,19 @@ bridge:
# and send it to WhatsApp? URL previews can always be sent using the `com.beeper.linkpreviews` # and send it to WhatsApp? URL previews can always be sent using the `com.beeper.linkpreviews`
# key in the event content even if this is disabled. # key in the event content even if this is disabled.
url_previews: false url_previews: false
# Send captions in the same message as images. This will send data compatible with both MSC2530 and MSC3552.
# This is currently not supported in most clients.
caption_in_message: false
# Maximum time for handling Matrix events. Duration strings formatted for https://pkg.go.dev/time#ParseDuration
# Null means there's no enforced timeout.
message_handling_timeout:
# Send an error message after this timeout, but keep waiting for the response until the deadline.
# This is counted from the origin_server_ts, so the warning time is consistent regardless of the source of delay.
# If the message is older than this when it reaches the bridge, the message won't be handled at all.
error_after: null
# Drop messages after this timeout. They may still go through if the message got sent to the servers.
# This is counted from the time the bridge starts handling the message.
deadline: 120s
# The prefix for commands. Only required in non-management rooms. # The prefix for commands. Only required in non-management rooms.
command_prefix: "!wa" command_prefix: "!wa"
@ -311,18 +323,45 @@ bridge:
# This will cause the bridge bot to be in private chats for the encryption to work properly. # This will cause the bridge bot to be in private chats for the encryption to work properly.
# It is recommended to also set private_chat_portal_meta to true when using this. # It is recommended to also set private_chat_portal_meta to true when using this.
default: false default: false
# Options for automatic key sharing. # Require encryption, drop any unencrypted messages.
key_sharing: require: false
# Enable key sharing? If enabled, key requests for rooms where users are in will be fulfilled. # 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. # You must use a client that supports requesting keys from other users to use this feature.
allow: false allow_key_sharing: false
# Require the requesting device to have a valid cross-signing signature? # What level of device verification should be required from users?
# This doesn't require that the bridge has verified the device, only that the user has verified it. #
# Not yet implemented. # Valid levels:
require_cross_signing: false # unverified - Send keys to all device in the room.
# Require devices to be verified by the bridge? # cross-signed-untrusted - Require valid cross-signing, but trust all cross-signing keys.
# Verification by the bridge is not yet implemented. # cross-signed-tofu - Require valid cross-signing, trust cross-signing keys on first use (and reject changes).
require_verification: true # cross-signed-verified - Require valid cross-signing, plus a valid user signature from the bridge bot.
# Note that creating user signatures from the bridge bot is not currently possible.
# verified - Require manual per-device verification
# (currently only possible by modifying the `trust` column in the `crypto_device` database table).
verification_levels:
# Minimum level for which the bridge should send keys to when bridging messages from WhatsApp to Matrix.
receive: unverified
# Minimum level that the bridge should accept for incoming Matrix messages.
send: unverified
# Minimum level that the bridge should require for accepting key requests.
share: cross-signed-tofu
# Options for Megolm room key rotation. These options allow you to
# configure the m.room.encryption event content. See:
# https://spec.matrix.org/v1.3/client-server-api/#mroomencryption for
# more information about that event.
rotation:
# Enable custom Megolm room key rotation settings. Note that these
# settings will only apply to rooms created after this option is
# set.
enable_custom: false
# The maximum number of milliseconds a session should be used
# before changing it. The Matrix spec recommends 604800000 (a week)
# as the default.
milliseconds: 604800000
# The maximum number of messages that should be sent with a given a
# session before changing it. The Matrix spec recommends 100 as the
# default.
messages: 100
# Settings for provisioning API # Settings for provisioning API
provisioning: provisioning:
@ -382,6 +421,6 @@ logging:
file_mode: 0o600 file_mode: 0o600
# Timestamp format for log entries in the Go time format. # Timestamp format for log entries in the Go time format.
timestamp_format: "Jan _2, 2006 15:04:05" timestamp_format: "Jan _2, 2006 15:04:05"
# Minimum severity for log messages printed to stdout/stderr. This doesn't affect the log file. # Options: debug, info, warn, error, fatal # Minimum severity for log messages printed to stdout/stderr. This doesn't affect the log file.
#print_level: debug # Options: debug, info, warn, error, fatal
print_level: __LOG_LEVEL__ print_level: __LOG_LEVEL__