example-config.yaml 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  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. # Authentication tokens for AS <-> HS communication. Autogenerated; do not modify.
  50. as_token: "This value is generated when generating the registration"
  51. hs_token: "This value is generated when generating the registration"
  52. # Bridge config
  53. bridge:
  54. # Localpart template of MXIDs for Discord users.
  55. # {{.}} is replaced with the phone number of the WhatsApp user.
  56. username_template: discord_{{.}}
  57. # Displayname template for Discord userss.
  58. displayname_template: '{{.Username}}#{{.Discriminator}} (D){{if .Bot}} (bot){{end}}'
  59. portal_message_buffer: 128
  60. # Should the bridge sync with double puppeting to receive EDUs that aren't normally sent to appservices.
  61. sync_with_custom_puppets: true
  62. # Should the bridge update the m.direct account data event when double puppeting is enabled.
  63. # Note that updating the m.direct event is not atomic (except with mautrix-asmux)
  64. # and is therefore prone to race conditions.
  65. sync_direct_chat_list: false
  66. # When double puppeting is enabled, users can use `!wa toggle` to change whether
  67. # presence and read receipts are bridged. These settings set the default values.
  68. # Existing users won't be affected when these are changed.
  69. default_bridge_receipts: true
  70. default_bridge_presence: true
  71. # Servers to always allow double puppeting from
  72. double_puppet_server_map:
  73. example.com: https://example.com
  74. # Allow using double puppeting from any server with a valid client .well-known file.
  75. double_puppet_allow_discovery: false
  76. # Shared secrets for https://github.com/devture/matrix-synapse-shared-secret-auth
  77. #
  78. # If set, double puppeting will be enabled automatically for local users
  79. # instead of users having to find an access token and run `login-matrix`
  80. # manually.
  81. login_shared_secret_map:
  82. example.com: foobar
  83. # The prefix for commands. Only required in non-management rooms.
  84. command_prefix: '!dis'
  85. # Messages sent upon joining a management room.
  86. # Markdown is supported. The defaults are listed below.
  87. management_room_text:
  88. # Sent when joining a room.
  89. welcome: "Hello, I'm a WhatsApp bridge bot."
  90. # Sent when joining a management room and the user is already logged in.
  91. welcome_connected: "Use `help` for help."
  92. # Sent when joining a management room and the user is not logged in.
  93. welcome_unconnected: "Use `help` for help or `login` to log in."
  94. # Optional extra text sent when joining a management room.
  95. additional_help: ""
  96. logging:
  97. directory: ./logs
  98. file_name_format: '{{.Date}}-{{.Index}}.log'
  99. file_date_format: "2006-01-02"
  100. file_mode: 384
  101. timestamp_format: Jan _2, 2006 15:04:05
  102. print_level: debug
  103. print_json: false
  104. file_json: false