Matrix Docker Ansible eploy
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

272 lines
14 KiB

  1. {#
  2. SPDX-FileCopyrightText: 2024 MDAD Team and contributors
  3. SPDX-License-Identifier: AGPL-3.0-or-later
  4. #}
  5. #jinja2: lstrip_blocks: "True"
  6. # Homeserver details.
  7. homeserver:
  8. # The address that this appservice can use to connect to the homeserver.
  9. address: {{ matrix_wechat_homeserver_address | to_json }}
  10. # The domain of the homeserver (for MXIDs, etc).
  11. domain: {{ matrix_wechat_homeserver_domain | to_json }}
  12. # What software is the homeserver running?
  13. # Standard Matrix homeservers like Synapse, Dendrite and Conduit should just use "standard" here.
  14. software: standard
  15. # The URL to push real-time bridge status to.
  16. # If set, the bridge will make POST requests to this URL whenever a user's connection state changes.
  17. # The bridge will use the appservice as_token to authorize requests.
  18. status_endpoint: null
  19. # Endpoint for reporting per-message status.
  20. message_send_checkpoint_endpoint: null
  21. # Does the homeserver support https://github.com/matrix-org/matrix-spec-proposals/pull/2246?
  22. async_media: false
  23. # Should the bridge use a websocket for connecting to the homeserver?
  24. # The server side is currently not documented anywhere and is only implemented by mautrix-wsproxy,
  25. # mautrix-asmux (deprecated), and hungryserv (proprietary).
  26. websocket: false
  27. # How often should the websocket be pinged? Pinging will be disabled if this is zero.
  28. ping_interval_seconds: 0
  29. # Application service host/registration related details.
  30. # Changing these values requires regeneration of the registration.
  31. appservice:
  32. # The address that the homeserver can use to connect to this appservice.
  33. address: {{ matrix_wechat_appservice_address | to_json }}
  34. # The hostname and port where this appservice should listen.
  35. hostname: 0.0.0.0
  36. port: 8080
  37. # Database config.
  38. database:
  39. # The database type. "sqlite3" and "postgres" are supported.
  40. type: postgres
  41. # The database URI.
  42. # SQLite: File name is enough. https://github.com/mattn/go-sqlite3#connection-string
  43. # Postgres: Connection string. For example, postgres://user:password@host/database?sslmode=disable
  44. # To connect via Unix socket, use something like postgres:///dbname?host=/var/run/postgresql
  45. uri: {{ matrix_wechat_database_connection_string | to_json }}
  46. # Maximum number of connections. Mostly relevant for Postgres.
  47. max_open_conns: 20
  48. max_idle_conns: 2
  49. # Maximum connection idle time and lifetime before they're closed. Disabled if null.
  50. # Parsed with https://pkg.go.dev/time#ParseDuration
  51. max_conn_idle_time: null
  52. max_conn_lifetime: null
  53. # The unique ID of this appservice.
  54. id: wechat
  55. # Appservice bot details.
  56. bot:
  57. # Username of the appservice bot.
  58. username: {{ matrix_wechat_appservice_bot_username | to_json }}
  59. # Display name and avatar for bot. Set to "remove" to remove display name/avatar, leave empty
  60. # to leave display name/avatar as-is.
  61. displayname: WeChat bridge bot
  62. avatar: mxc://matrix.org/rddVQBTjOOmNkNLXWfYJNfPW
  63. # Whether or not to receive ephemeral events via appservice transactions.
  64. # Requires MSC2409 support (i.e. Synapse 1.22+).
  65. ephemeral_events: true
  66. # Should incoming events be handled asynchronously?
  67. # This may be necessary for large public instances with lots of messages going through.
  68. # However, messages will not be guaranteed to be bridged in the same order they were sent in.
  69. async_transactions: false
  70. # Authentication tokens for AS <-> HS communication. Autogenerated; do not modify.
  71. as_token: {{ matrix_wechat_appservice_token | to_json }}
  72. hs_token: {{ matrix_wechat_homeserver_token | to_json }}
  73. # Bridge config
  74. bridge:
  75. # Localpart template of MXIDs for WeChat users.
  76. # {% raw %}{{.}}{% endraw %} is replaced with the uin of the WeChat user.
  77. username_template: {% raw %}_wechat_{{.}}{% endraw %}
  78. # Displayname template for WeChat users.
  79. displayname_template: "{% raw %}{{if .Name}}{{.Name}}{{else}}{{.Uin}}{{end}} (WeChat){% endraw %}"
  80. # WeChat listen address (for agent connection)
  81. listen_address: "0.0.0.0:20002"
  82. listen_secret: {{ matrix_wechat_bridge_listen_secret | to_json }}
  83. # Should the bridge create a space for each logged-in user and add bridged rooms to it?
  84. # Users who logged in before turning this on should run `!wa sync space` to create and fill the space for the first time.
  85. personal_filtering_spaces: true
  86. # Whether the bridge should send the message status as a custom com.beeper.message_send_status event.
  87. message_status_events: false
  88. # Whether the bridge should send error notices via m.notice events when a message fails to bridge.
  89. message_error_notices: true
  90. portal_message_buffer: 128
  91. # Enable redaction
  92. allow_redaction: false
  93. # Should puppet avatars be fetched from the server even if an avatar is already set?
  94. user_avatar_sync: true
  95. # Should the bridge update the m.direct account data event when double puppeting is enabled.
  96. # Note that updating the m.direct event is not atomic (except with mautrix-asmux)
  97. # and is therefore prone to race conditions.
  98. sync_direct_chat_list: false
  99. # When double puppeting is enabled, users can use `!wa toggle` to change whether
  100. # presence is bridged. These settings set the default values.
  101. # Existing users won't be affected when these are changed.
  102. default_bridge_presence: false
  103. # Send the presence as "available" to WeChat when users start typing on a portal.
  104. # This works as a workaround for homeservers that do not support presence, and allows
  105. # users to see when the WeChat user on the other side is typing during a conversation.
  106. send_presence_on_typing: false
  107. # Servers to always allow double puppeting from
  108. double_puppet_server_map:
  109. "{{ matrix_wechat_homeserver_domain }}": {{ matrix_wechat_homeserver_address }}
  110. # Allow using double puppeting from any server with a valid client .well-known file.
  111. double_puppet_allow_discovery: false
  112. # Shared secrets for https://github.com/devture/matrix-synapse-shared-secret-auth
  113. #
  114. # If set, double puppeting will be enabled automatically for local users
  115. # instead of users having to find an access token and run `login-matrix`
  116. # manually.
  117. login_shared_secret_map: {{ matrix_wechat_login_shared_secret_map | to_json }}
  118. # Whether to explicitly set the avatar and room name for private chat portal rooms.
  119. # If set to `default`, this will be enabled in encrypted rooms and disabled in unencrypted rooms.
  120. # If set to `always`, all DM rooms will have explicit names and avatars set.
  121. # If set to `never`, DM rooms will never have names and avatars set.
  122. private_chat_portal_meta: default
  123. # Should group members be synced in parallel? This makes member sync faster
  124. parallel_member_sync: false
  125. # Set this to true to tell the bridge to re-send m.bridge events to all rooms on the next run.
  126. # This field will automatically be changed back to false after it, except if the config file is not writable.
  127. resend_bridge_info: false
  128. # When using double puppeting, should muted chats be muted in Matrix?
  129. mute_bridging: false
  130. # Allow invite permission for user. User can invite any bots to room with WeChat
  131. # users (private chat and groups)
  132. allow_user_invite: false
  133. # Whether or not created rooms should have federation enabled.
  134. # If false, created portal rooms will never be federated.
  135. federate_rooms: true
  136. # Should the bridge never send alerts to the bridge management room?
  137. # These are mostly things like the user being logged out.
  138. disable_bridge_alerts: false
  139. # Maximum time for handling Matrix events. Duration strings formatted for https://pkg.go.dev/time#ParseDuration
  140. # Null means there's no enforced timeout.
  141. message_handling_timeout:
  142. # Send an error message after this timeout, but keep waiting for the response until the deadline.
  143. # This is counted from the origin_server_ts, so the warning time is consistent regardless of the source of delay.
  144. # If the message is older than this when it reaches the bridge, the message won't be handled at all.
  145. error_after: null
  146. # Drop messages after this timeout. They may still go through if the message got sent to the servers.
  147. # This is counted from the time the bridge starts handling the message.
  148. deadline: 120s
  149. # The prefix for commands. Only required in non-management rooms.
  150. command_prefix: {{ matrix_wechat_command_prefix | to_json }}
  151. # Messages sent upon joining a management room.
  152. # Markdown is supported. The defaults are listed below.
  153. management_room_text:
  154. # Sent when joining a room.
  155. welcome: "Hello, I'm a WeChat bridge bot."
  156. # Sent when joining a management room and the user is already logged in.
  157. welcome_connected: "Use `help` for help."
  158. # Sent when joining a management room and the user is not logged in.
  159. welcome_unconnected: "Use `help` for help or `login` to log in."
  160. # Optional extra text sent when joining a management room.
  161. additional_help: ""
  162. # End-to-bridge encryption support options.
  163. #
  164. # See https://docs.mau.fi/bridges/general/end-to-bridge-encryption.html for more info.
  165. encryption:
  166. # Allow encryption, work in group chat rooms with e2ee enabled
  167. allow: {{ matrix_wechat_encryption_allow | to_json }}
  168. # Default to encryption, force-enable encryption in all portals the bridge creates
  169. # This will cause the bridge bot to be in private chats for the encryption to work properly.
  170. default: {{ matrix_wechat_encryption_default | to_json }}
  171. # Whether to use MSC2409/MSC3202 instead of /sync long polling for receiving encryption-related data.
  172. appservice: false
  173. # Require encryption, drop any unencrypted messages.
  174. require: false
  175. # Enable key sharing? If enabled, key requests for rooms where users are in will be fulfilled.
  176. # You must use a client that supports requesting keys from other users to use this feature.
  177. allow_key_sharing: false
  178. # Should users mentions be in the event wire content to enable the server to send push notifications?
  179. plaintext_mentions: false
  180. # Options for deleting megolm sessions from the bridge.
  181. delete_keys:
  182. # Beeper-specific: delete outbound sessions when hungryserv confirms
  183. # that the user has uploaded the key to key backup.
  184. delete_outbound_on_ack: false
  185. # Don't store outbound sessions in the inbound table.
  186. dont_store_outbound: false
  187. # Ratchet megolm sessions forward after decrypting messages.
  188. ratchet_on_decrypt: false
  189. # Delete fully used keys (index >= max_messages) after decrypting messages.
  190. delete_fully_used_on_decrypt: false
  191. # Delete previous megolm sessions from same device when receiving a new one.
  192. delete_prev_on_new_session: false
  193. # Delete megolm sessions received from a device when the device is deleted.
  194. delete_on_device_delete: false
  195. # Periodically delete megolm sessions when 2x max_age has passed since receiving the session.
  196. periodically_delete_expired: false
  197. # Delete inbound megolm sessions that don't have the received_at field used for
  198. # automatic ratcheting and expired session deletion. This is meant as a migration
  199. # to delete old keys prior to the bridge update.
  200. delete_outdated_inbound: false
  201. # What level of device verification should be required from users?
  202. #
  203. # Valid levels:
  204. # unverified - Send keys to all device in the room.
  205. # cross-signed-untrusted - Require valid cross-signing, but trust all cross-signing keys.
  206. # cross-signed-tofu - Require valid cross-signing, trust cross-signing keys on first use (and reject changes).
  207. # cross-signed-verified - Require valid cross-signing, plus a valid user signature from the bridge bot.
  208. # Note that creating user signatures from the bridge bot is not currently possible.
  209. # verified - Require manual per-device verification
  210. # (currently only possible by modifying the `trust` column in the `crypto_device` database table).
  211. verification_levels:
  212. # Minimum level for which the bridge should send keys to when bridging messages from WeChat to Matrix.
  213. receive: unverified
  214. # Minimum level that the bridge should accept for incoming Matrix messages.
  215. send: unverified
  216. # Minimum level that the bridge should require for accepting key requests.
  217. share: cross-signed-tofu
  218. # Options for Megolm room key rotation. These options allow you to
  219. # configure the m.room.encryption event content. See:
  220. # https://spec.matrix.org/v1.3/client-server-api/#mroomencryption for
  221. # more information about that event.
  222. rotation:
  223. # Enable custom Megolm room key rotation settings. Note that these
  224. # settings will only apply to rooms created after this option is
  225. # set.
  226. enable_custom: false
  227. # The maximum number of milliseconds a session should be used
  228. # before changing it. The Matrix spec recommends 604800000 (a week)
  229. # as the default.
  230. milliseconds: 604800000
  231. # The maximum number of messages that should be sent with a given a
  232. # session before changing it. The Matrix spec recommends 100 as the
  233. # default.
  234. messages: 100
  235. # Disable rotating keys when a user's devices change?
  236. # You should not enable this option unless you understand all the implications.
  237. disable_device_change_key_rotation: false
  238. # Permissions for using the bridge.
  239. # Permitted values:
  240. # user - Access to use the bridge to chat with a WeChat account.
  241. # admin - User level and some additional administration tools
  242. # Permitted keys:
  243. # * - All Matrix users
  244. # domain - All users on that homeserver
  245. # mxid - Specific user
  246. permissions: {{ matrix_wechat_permissions | to_json }}
  247. # Logging config. See https://github.com/tulir/zeroconfig for details.
  248. logging:
  249. min_level: {{ matrix_wechat_log_level }}
  250. writers:
  251. - type: stdout
  252. format: pretty-colored