example-config.yaml 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. # Homeserver details.
  2. homeserver:
  3. # The address that this appservice can use to connect to the homeserver.
  4. address: http://localhost:29326
  5. # The domain of the homeserver (for MXIDs, etc).
  6. domain: example.com
  7. # Is the homeserver actually mautrix-asmux?
  8. asmux: false
  9. # The URL to push real-time bridge status to.
  10. # If set, the bridge will make POST requests to this URL whenever a user's whatsapp connection state changes.
  11. # The bridge will use the appservice as_token to authorize requests.
  12. status_endpoint: null
  13. # Application service host/registration related details.
  14. # Changing these values requires regeneration of the registration.
  15. appservice:
  16. # The address that the homeserver can use to connect to this appservice.
  17. address: http://localhost:29350
  18. # The hostname and port where this appservice should listen.
  19. hostname: 0.0.0.0
  20. port: 29350
  21. # Database config.
  22. database:
  23. # The database type. "sqlite3" and "postgres" are supported.
  24. type: sqlite3
  25. # The database URI.
  26. # SQLite: File name is enough. https://github.com/mattn/go-sqlite3#connection-string
  27. # Postgres: Connection string. For example, postgres://user:password@host/database?sslmode=disable
  28. # To connect via Unix socket, use something like postgres:///dbname?host=/var/run/postgresql
  29. uri: mautrix-whatsapp.db
  30. # Maximum number of connections. Mostly relevant for Postgres.
  31. max_open_conns: 20
  32. max_idle_conns: 2
  33. # Maximum connection idle time and lifetime before they're closed. Disabled if null.
  34. # Parsed with https://pkg.go.dev/time#ParseDuration
  35. max_conn_idle_time: null
  36. max_conn_lifetime: null
  37. # Settings for provisioning API
  38. provisioning:
  39. # Prefix for the provisioning API paths.
  40. prefix: /_matrix/provision
  41. # Shared secret for authentication. If set to "generate", a random secret will be generated,
  42. # or if set to "disable", the provisioning API will be disabled.
  43. shared_secret: generate
  44. id: discord
  45. bot:
  46. username: discordbot
  47. displayname: Discord bridge bot
  48. avatar: mxc://beeper.com/222332ba2b197e57b73ef2db236232db79af62d0
  49. # Whether or not to receive ephemeral events via appservice transactions.
  50. # Requires MSC2409 support (i.e. Synapse 1.22+).
  51. # You should disable bridge -> sync_with_custom_puppets when this is enabled.
  52. ephemeral_events: false
  53. # Authentication tokens for AS <-> HS communication. Autogenerated; do not modify.
  54. as_token: "This value is generated when generating the registration"
  55. hs_token: "This value is generated when generating the registration"
  56. # Bridge config
  57. bridge:
  58. # Localpart template of MXIDs for Discord users.
  59. # {{.}} is replaced with the phone number of the WhatsApp user.
  60. username_template: discord_{{.}}
  61. # Displayname template for Discord userss.
  62. displayname_template: '{{.Username}}#{{.Discriminator}} (D){{if .Bot}} (bot){{end}}'
  63. portal_message_buffer: 128
  64. # Should the bridge sync with double puppeting to receive EDUs that aren't normally sent to appservices.
  65. sync_with_custom_puppets: true
  66. # Should the bridge update the m.direct account data event when double puppeting is enabled.
  67. # Note that updating the m.direct event is not atomic (except with mautrix-asmux)
  68. # and is therefore prone to race conditions.
  69. sync_direct_chat_list: false
  70. # When double puppeting is enabled, users can use `!wa toggle` to change whether
  71. # presence and read receipts are bridged. These settings set the default values.
  72. # Existing users won't be affected when these are changed.
  73. default_bridge_receipts: true
  74. default_bridge_presence: true
  75. # Servers to always allow double puppeting from
  76. double_puppet_server_map:
  77. example.com: https://example.com
  78. # Allow using double puppeting from any server with a valid client .well-known file.
  79. double_puppet_allow_discovery: false
  80. # Shared secrets for https://github.com/devture/matrix-synapse-shared-secret-auth
  81. #
  82. # If set, double puppeting will be enabled automatically for local users
  83. # instead of users having to find an access token and run `login-matrix`
  84. # manually.
  85. login_shared_secret_map:
  86. example.com: foobar
  87. # The prefix for commands. Only required in non-management rooms.
  88. command_prefix: '!dis'
  89. # Messages sent upon joining a management room.
  90. # Markdown is supported. The defaults are listed below.
  91. management_room_text:
  92. # Sent when joining a room.
  93. welcome: "Hello, I'm a WhatsApp bridge bot."
  94. # Sent when joining a management room and the user is already logged in.
  95. welcome_connected: "Use `help` for help."
  96. # Sent when joining a management room and the user is not logged in.
  97. welcome_unconnected: "Use `help` for help or `login` to log in."
  98. # Optional extra text sent when joining a management room.
  99. additional_help: ""
  100. logging:
  101. directory: ./logs
  102. file_name_format: '{{.Date}}-{{.Index}}.log'
  103. file_date_format: "2006-01-02"
  104. file_mode: 384
  105. timestamp_format: Jan _2, 2006 15:04:05
  106. print_level: debug
  107. print_json: false
  108. file_json: false