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

unique setting name

This commit is contained in:
Gredin 67 2023-01-06 00:00:26 +01:00
parent f58912baed
commit 80bff155fd
2 changed files with 42 additions and 27 deletions

View file

@ -52,7 +52,7 @@ appservice:
bot:
# Username of the appservice bot.
#username: whatsappbot
username: __USERNAME__
username: __BOTNAME__
# Display name and avatar for bot. Set to "remove" to remove display name/avatar, leave empty
# to leave display name/avatar as-is.
displayname: __DISPLAYNAME__
@ -73,9 +73,9 @@ segment_key: null
# Prometheus config.
metrics:
# Enable prometheus metrics?
enabled: __METRICS_ENABLED__
enabled: __ENABLE_METRICS__
# IP and port where the metrics listener should be. The path is always /metrics
listen: __LISTEN__
listen: __METRICS_LISTEN_PORT__
# Config for things that are directly sent to WhatsApp.
whatsapp:
@ -334,11 +334,11 @@ bridge:
# Default to encryption, force-enable encryption in all portals the bridge creates
# 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.
default: __DEFAULT__
default: __ENCRYPTION_DEFAULT__
# Whether to use MSC2409/MSC3202 instead of /sync long polling for receiving encryption-related data.
appservice: false
# Require encryption, drop any unencrypted messages.
require: __REQUIRE__
require: __ENCRYPTION_REQUIRE__
# 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: false
@ -406,7 +406,7 @@ bridge:
# Whether relay mode should be allowed. If allowed, `!wa set-relay` can be used to turn any
# authenticated user into a relaybot for that chat.
#enabled: false
enabled: __ENABLED__
enabled: __ENABLE_RELAYBOT__
# Should only admins be allowed to set themselves as relay users?
admin_only: __ADMIN_ONLY__
# The formats to use when sending messages to WhatsApp via the relaybot.

View file

@ -13,7 +13,7 @@ services = ["__APP__"]
yes = "true"
no = "false"
help = "Enables asynchronous media uploads"
bind = "homeserver>async_media:__FINALPATH__/config.yaml"
bind = ":__FINALPATH__/config.yaml"
[appservice]
name = "Application service configuration"
@ -28,7 +28,7 @@ services = ["__APP__"]
yes = "true"
no = "false"
help = "Requires MSC2409 support (i.e. Synapse 1.22+). You should disable bridge -> sync_with_custom_puppets when this is enabled"
bind = "appservice>ephemeral_events:__FINALPATH__/config.yaml"
bind = ":__FINALPATH__/config.yaml"
[appservice.bot]
name = "Appservice bot configuration"
@ -37,16 +37,19 @@ services = ["__APP__"]
ask = "Username of the appservice bot"
type = "string"
help = "Sets bot username. Please keep in mind that the bot admin room for previous bot username will stop working so you may need to create a new one using the new username"
bind = ":__FINALPATH__/config.yaml"
[appservice.bot.displayname]
ask = "Display name for bot"
type = "string"
help = "Set to 'remove' to remove display name, leave empty to leave display name as-is"
bind = ":__FINALPATH__/config.yaml"
[appservice.bot.avatar]
ask = "Avatar for bot"
type = "string"
help = "Set to 'remove' to remove avatar, leave empty to leave avatar as-is"
bind = ":__FINALPATH__/config.yaml"
[metrics]
name = "Prometheus configuration"
@ -55,19 +58,18 @@ services = ["__APP__"]
[metrics.config]
name = "General configuration"
[metrics.config.enabled]
[metrics.config.enable_metrics]
ask = "Enable prometheus metrics"
type = "boolean"
yes = "true"
no = "false"
bind = "metrics>enabled:__FINALPATH__/config.yaml"
bind = ":__FINALPATH__/config.yaml"
[metrics.config.listen]
[metrics.config.metrics_listen_port]
ask = "IP and port where the metrics listener should be"
type = "string"
default = "127.0.0.1:8001"
help = "The path is always /metrics"
bind = "metrics>listen:__FINALPATH__/config.yaml"
bind = ":__FINALPATH__/config.yaml"
[whatsapp]
name = "Whatsapp configuration"
@ -80,16 +82,14 @@ services = ["__APP__"]
[whatsapp.config.os_name]
ask = "Device name that's shown in the 'WhatsApp Web' section in the mobile app"
type = "string"
default = "Mautrix-WhatsApp bridge"
bind = "whatsapp>os_name:__FINALPATH__/config.yaml"
bind = ":__FINALPATH__/config.yaml"
[whatsapp.config.browser_name]
ask = "Browser name that determines the logo shown in the mobile app"
type = "select"
choices = ["unknown", "chrome", "firefox", "ie", "opera", "safari", "edge", "desktop", "ipad", "android_tablet", "ohana", "aloha", "catalina", "tcl_tv"]
default = "unknown"
help = "Must be 'unknown' for a generic icon or a valid browser name if you want a specific icon"
bind = "whatsapp>browser_name:__FINALPATH__/config.yaml"
bind = ":__FINALPATH__/config.yaml"
[bridge]
name = "Bridge configuration"
@ -101,9 +101,24 @@ services = ["__APP__"]
[bridge.config.username_template]
ask = "Localpart template of MXIDs for WhatsApp users"
type = "string"
default = "whatsapp_{{.}}"
help = "{{.}} is replaced with the phone number of the WhatsApp user"
bind = "bridge>username_template:__FINALPATH__/config.yaml"
bind = ":__FINALPATH__/config.yaml"
[bridge.config.enable_relaybot]
ask = "Whether relay mode should be allowed."
type = "boolean"
yes = "true"
no = "false"
help = "If allowed, `!wa set-relay` can be used to turn any authenticated user into a relaybot for that chat."
bind = ":__FINALPATH__/config.yaml"
[bridge.config.admin_only]
ask = "Should only admins be allowed to set themselves as relay users?"
type = "boolean"
yes = "true"
no = "false"
help = "see User management -> Admins"
bind = ":__FINALPATH__/config.yaml"
[encryption]
name = "Encryption"
@ -117,23 +132,23 @@ services = ["__APP__"]
yes = "true"
no = "false"
help = "Enables end to bridge encryption"
bind = "encryption>allow:__FINALPATH__/config.yaml"
bind = ":__FINALPATH__/config.yaml"
[encryption.config.default_encryption]
[encryption.config.encryption_default]
ask = "Default encryption"
type = "boolean"
yes = "true"
no = "false"
help = "Force-enable encryption in all portals the bridge creates. This will cause the bridge bot to be in private chats for the encryption to work properly."
bind = "encryption>default:__FINALPATH__/config.yaml"
bind = ":__FINALPATH__/config.yaml"
[encryption.config.require_encryption]
[encryption.config.encryption_require]
ask = "Require encryption"
type = "boolean"
yes = "true"
no = "false"
help = "Require encryption, drop any unencrypted messages."
bind = "encryption>require:__FINALPATH__/config.yaml"
bind = ":__FINALPATH__/config.yaml"
[usermanagement]
name = "User management"
@ -179,7 +194,7 @@ services = ["__APP__"]
yes = "true"
no = "false"
help = "Should the bridge send a read receipt from the bridge bot when a message has been sent to WhatsApp?"
bind = "bridge>delivery_receipts:__FINALPATH__/config.yaml"
bind = ":__FINALPATH__/config.yaml"
[privacy.config.send_presence_on_typing]
ask = "Send presence on typing"
@ -187,7 +202,7 @@ services = ["__APP__"]
yes = "true"
no = "false"
help = "Send the presence as 'available' to whatsapp when users start typing on a portal."
bind = "bridge>send_presence_on_typing:__FINALPATH__/config.yaml"
bind = ":__FINALPATH__/config.yaml"
[privacy.config.url_previews]
ask = "URL previews"
@ -195,4 +210,4 @@ services = ["__APP__"]
yes = "true"
no = "false"
help = "Should the bridge detect URLs in outgoing messages, ask the homeserver to generate a preview, and send it to WhatsApp?"
bind = "bridge>url_previews:__FINALPATH__/config.yaml"
bind = ":__FINALPATH__/config.yaml"