example-config.yaml 5.3 KB

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