Matrix Docker Ansible eploy
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 

415 satır
24 KiB

  1. #jinja2: lstrip_blocks: "True"
  2. # Homeserver details.
  3. homeserver:
  4. # The address that this appservice can use to connect to the homeserver.
  5. address: {{ matrix_mautrix_whatsapp_homeserver_address }}
  6. # The domain of the homeserver (for MXIDs, etc).
  7. domain: {{ matrix_mautrix_whatsapp_homeserver_domain }}
  8. # What software is the homeserver running?
  9. # Standard Matrix homeservers like Synapse, Dendrite and Conduit should just use "standard" here.
  10. software: standard
  11. # The URL to push real-time bridge status to.
  12. # If set, the bridge will make POST requests to this URL whenever a user's whatsapp connection state changes.
  13. # The bridge will use the appservice as_token to authorize requests.
  14. status_endpoint: null
  15. # Endpoint for reporting per-message status.
  16. message_send_checkpoint_endpoint: null
  17. # Does the homeserver support https://github.com/matrix-org/matrix-spec-proposals/pull/2246?
  18. async_media: false
  19. # Application service host/registration related details.
  20. # Changing these values requires regeneration of the registration.
  21. appservice:
  22. # The address that the homeserver can use to connect to this appservice.
  23. address: {{ matrix_mautrix_whatsapp_appservice_address }}
  24. # The hostname and port where this appservice should listen.
  25. hostname: 0.0.0.0
  26. port: 8080
  27. # Database config.
  28. database:
  29. # The database type. "sqlite3" and "postgres" are supported.
  30. type: {{ matrix_mautrix_whatsapp_appservice_database_type|to_json }}
  31. # The database URI.
  32. # SQLite: File name is enough. https://github.com/mattn/go-sqlite3#connection-string
  33. # Postgres: Connection string. For example, postgres://user:password@host/database?sslmode=disable
  34. # To connect via Unix socket, use something like postgres:///dbname?host=/var/run/postgresql
  35. uri: {{ matrix_mautrix_whatsapp_appservice_database_uri|to_json }}
  36. # Maximum number of connections. Mostly relevant for Postgres.
  37. max_open_conns: 20
  38. max_idle_conns: 2
  39. # Maximum connection idle time and lifetime before they're closed. Disabled if null.
  40. # Parsed with https://pkg.go.dev/time#ParseDuration
  41. max_conn_idle_time: null
  42. max_conn_lifetime: null
  43. # The unique ID of this appservice.
  44. id: whatsapp
  45. # Appservice bot details.
  46. bot:
  47. # Username of the appservice bot.
  48. username: {{ matrix_mautrix_whatsapp_appservice_bot_username|to_json }}
  49. # Display name and avatar for bot. Set to "remove" to remove display name/avatar, leave empty
  50. # to leave display name/avatar as-is.
  51. displayname: WhatsApp bridge bot
  52. avatar: mxc://maunium.net/NeXNQarUbrlYBiPCpprYsRqr
  53. # Whether or not to receive ephemeral events via appservice transactions.
  54. # Requires MSC2409 support (i.e. Synapse 1.22+).
  55. # You should disable bridge -> sync_with_custom_puppets when this is enabled.
  56. ephemeral_events: false
  57. # Authentication tokens for AS <-> HS communication. Autogenerated; do not modify.
  58. as_token: "{{ matrix_mautrix_whatsapp_appservice_token }}"
  59. hs_token: "{{ matrix_mautrix_whatsapp_homeserver_token }}"
  60. # Segment API key to track some events, like provisioning API login and encryption errors.
  61. segment_key: null
  62. # Prometheus config.
  63. metrics:
  64. # Enable prometheus metrics?
  65. enabled: false
  66. # IP and port where the metrics listener should be. The path is always /metrics
  67. listen: 127.0.0.1:8001
  68. # Config for things that are directly sent to WhatsApp.
  69. whatsapp:
  70. # Device name that's shown in the "WhatsApp Web" section in the mobile app.
  71. os_name: Mautrix-WhatsApp bridge
  72. # Browser name that determines the logo shown in the mobile app.
  73. # Must be "unknown" for a generic icon or a valid browser name if you want a specific icon.
  74. # List of valid browser names: https://github.com/tulir/whatsmeow/blob/8b34d886d543b72e5f4699cf5b2797f68d598f78/binary/proto/def.proto#L38-L51
  75. browser_name: unknown
  76. # Bridge config
  77. bridge:
  78. # Localpart template of MXIDs for WhatsApp users.
  79. # {{ '{{.}}' }} is replaced with the phone number of the WhatsApp user.
  80. username_template: "{{ 'whatsapp_{{.}}' }}"
  81. # Displayname template for WhatsApp users.
  82. # {{ '{{.PushName}}' }} - nickname set by the WhatsApp user
  83. # {{ '{{.BusinessName}}' }} - validated WhatsApp business name
  84. # {{ '{{.Phone}}' }} - phone number (international format)
  85. # The following variables are also available, but will cause problems on multi-user instances:
  86. # {{ '{{.FullName}}' }} - full name from contact list
  87. # {{ '{{.FirstName}}' }} - first name from contact list
  88. displayname_template: "{{ '{{if .BusinessName}}{{.BusinessName}}{{else if .PushName}}{{.PushName}}{{else}}{{.JID}}{{end}} (WA)' }}"
  89. # Should the bridge create a space for each logged-in user and add bridged rooms to it?
  90. # Users who logged in before turning this on should run `!wa sync space` to create and fill the space for the first time.
  91. personal_filtering_spaces: {{ matrix_mautrix_whatsapp_bridge_personal_filtering_spaces | to_json }}
  92. # Should the bridge send a read receipt from the bridge bot when a message has been sent to WhatsApp?
  93. delivery_receipts: false
  94. # Whether the bridge should send the message status as a custom com.beeper.message_send_status event.
  95. message_status_events: false
  96. # Whether the bridge should send error notices via m.notice events when a message fails to bridge.
  97. message_error_notices: true
  98. # Should incoming calls send a message to the Matrix room?
  99. call_start_notices: true
  100. # Should another user's cryptographic identity changing send a message to Matrix?
  101. identity_change_notices: false
  102. portal_message_buffer: 128
  103. # Settings for handling history sync payloads.
  104. history_sync:
  105. # Should the bridge create portals for chats in the history sync payload?
  106. create_portals: true
  107. # Enable backfilling history sync payloads from WhatsApp using batch sending?
  108. # This requires a server with MSC2716 support, which is currently an experimental feature in synapse.
  109. # It can be enabled by setting experimental_features -> msc2716_enabled to true in homeserver.yaml.
  110. # Note that prior to Synapse 1.49, there were some bugs with the implementation, especially if using event persistence workers.
  111. # There are also still some issues in Synapse's federation implementation.
  112. backfill: false
  113. # Use double puppets for backfilling?
  114. # In order to use this, the double puppets must be in the appservice's user ID namespace
  115. # (because the bridge can't use the double puppet access token with batch sending).
  116. # This only affects double puppets on the local server, double puppets on other servers will never be used.
  117. # Doesn't work out of box with this playbook
  118. double_puppet_backfill: false
  119. # Should the bridge request a full sync from the phone when logging in?
  120. # This bumps the size of history syncs from 3 months to 1 year.
  121. request_full_sync: false
  122. # Settings for media requests. If the media expired, then it will not
  123. # be on the WA servers.
  124. # Media can always be requested by reacting with the ♻️ (recycle) emoji.
  125. # These settings determine if the media requests should be done
  126. # automatically during or after backfill.
  127. media_requests:
  128. # Should expired media be automatically requested from the server as
  129. # part of the backfill process?
  130. auto_request_media: true
  131. # Whether to request the media immediately after the media message
  132. # is backfilled ("immediate") or at a specific time of the day
  133. # ("local_time").
  134. request_method: immediate
  135. # If request_method is "local_time", what time should the requests
  136. # be sent (in minutes after midnight)?
  137. request_local_time: 120
  138. # The maximum number of initial conversations that should be synced.
  139. # Other conversations will be backfilled on demand when the start PM
  140. # provisioning endpoint is used or when a message comes in from that
  141. # chat.
  142. max_initial_conversations: -1
  143. # Settings for immediate backfills. These backfills should generally be
  144. # small and their main purpose is to populate each of the initial chats
  145. # (as configured by max_initial_conversations) with a few messages so
  146. # that you can continue conversations without loosing context.
  147. immediate:
  148. # The number of concurrent backfill workers to create for immediate
  149. # backfills. Note that using more than one worker could cause the
  150. # room list to jump around since there are no guarantees about the
  151. # order in which the backfills will complete.
  152. worker_count: 1
  153. # The maximum number of events to backfill initially.
  154. max_events: 10
  155. # Settings for deferred backfills. The purpose of these backfills are
  156. # to fill in the rest of the chat history that was not covered by the
  157. # immediate backfills. These backfills generally should happen at a
  158. # slower pace so as not to overload the homeserver.
  159. # Each deferred backfill config should define a "stage" of backfill
  160. # (i.e. the last week of messages). The fields are as follows:
  161. # - start_days_ago: the number of days ago to start backfilling from.
  162. # To indicate the start of time, use -1. For example, for a week ago, use 7.
  163. # - max_batch_events: the number of events to send per batch.
  164. # - batch_delay: the number of seconds to wait before backfilling each batch.
  165. deferred:
  166. # Last Week
  167. - start_days_ago: 7
  168. max_batch_events: 20
  169. batch_delay: 5
  170. # Last Month
  171. - start_days_ago: 30
  172. max_batch_events: 50
  173. batch_delay: 10
  174. # Last 3 months
  175. - start_days_ago: 90
  176. max_batch_events: 100
  177. batch_delay: 10
  178. # The start of time
  179. - start_days_ago: -1
  180. max_batch_events: 500
  181. batch_delay: 10
  182. # Should puppet avatars be fetched from the server even if an avatar is already set?
  183. user_avatar_sync: true
  184. # Should Matrix users leaving groups be bridged to WhatsApp?
  185. bridge_matrix_leave: true
  186. # Should the bridge sync with double puppeting to receive EDUs that aren't normally sent to appservices.
  187. sync_with_custom_puppets: true
  188. # Should the bridge update the m.direct account data event when double puppeting is enabled.
  189. # Note that updating the m.direct event is not atomic (except with mautrix-asmux)
  190. # and is therefore prone to race conditions.
  191. sync_direct_chat_list: false
  192. # Should the bridge use MSC2867 to bridge manual "mark as unread"s from
  193. # WhatsApp and set the unread status on initial backfill?
  194. # This will only work on clients that support the m.marked_unread or
  195. # com.famedly.marked_unread room account data.
  196. sync_manual_marked_unread: true
  197. # When double puppeting is enabled, users can use `!wa toggle` to change whether
  198. # presence and read receipts are bridged. These settings set the default values.
  199. # Existing users won't be affected when these are changed.
  200. default_bridge_receipts: true
  201. default_bridge_presence: true
  202. # Send the presence as "available" to whatsapp when users start typing on a portal.
  203. # This works as a workaround for homeservers that do not support presence, and allows
  204. # users to see when the whatsapp user on the other side is typing during a conversation.
  205. send_presence_on_typing: false
  206. # Should the bridge always send "active" delivery receipts (two gray ticks on WhatsApp)
  207. # even if the user isn't marked as online (e.g. when presence bridging isn't enabled)?
  208. #
  209. # By default, the bridge acts like WhatsApp web, which only sends active delivery
  210. # receipts when it's in the foreground.
  211. force_active_delivery_receipts: false
  212. # Servers to always allow double puppeting from
  213. double_puppet_server_map:
  214. "{{ matrix_mautrix_whatsapp_homeserver_domain }}": {{ matrix_mautrix_whatsapp_homeserver_address }}
  215. # Allow using double puppeting from any server with a valid client .well-known file.
  216. double_puppet_allow_discovery: false
  217. # Shared secrets for https://github.com/devture/matrix-synapse-shared-secret-auth
  218. #
  219. # If set, double puppeting will be enabled automatically for local users
  220. # instead of users having to find an access token and run `login-matrix`
  221. # manually.
  222. login_shared_secret_map: {{ matrix_mautrix_whatsapp_bridge_login_shared_secret_map|to_json }}
  223. # Should the bridge explicitly set the avatar and room name for private chat portal rooms?
  224. private_chat_portal_meta: false
  225. # Should Matrix m.notice-type messages be bridged?
  226. bridge_notices: true
  227. # Set this to true to tell the bridge to re-send m.bridge events to all rooms on the next run.
  228. # This field will automatically be changed back to false after it, except if the config file is not writable.
  229. resend_bridge_info: false
  230. # When using double puppeting, should muted chats be muted in Matrix?
  231. mute_bridging: {{ matrix_mautrix_whatsapp_bridge_mute_bridging | to_json }}
  232. # When using double puppeting, should archived chats be moved to a specific tag in Matrix?
  233. # Note that WhatsApp unarchives chats when a message is received, which will also be mirrored to Matrix.
  234. # This can be set to a tag (e.g. m.lowpriority), or null to disable.
  235. archive_tag: null
  236. # Same as above, but for pinned chats. The favorite tag is called m.favourite
  237. pinned_tag: null
  238. # Should mute status and tags only be bridged when the portal room is created?
  239. tag_only_on_create: true
  240. # Should WhatsApp status messages be bridged into a Matrix room?
  241. # Disabling this won't affect already created status broadcast rooms.
  242. enable_status_broadcast: {{ matrix_mautrix_whatsapp_bridge_enable_status_broadcast | to_json }}
  243. # Should sending WhatsApp status messages be allowed?
  244. # This can cause issues if the user has lots of contacts, so it's disabled by default.
  245. disable_status_broadcast_send: true
  246. # Should the status broadcast room be muted and moved into low priority by default?
  247. # This is only applied when creating the room, the user can unmute it later.
  248. mute_status_broadcast: true
  249. # Tag to apply to the status broadcast room.
  250. status_broadcast_tag: m.lowpriority
  251. # Should the bridge use thumbnails from WhatsApp?
  252. # They're disabled by default due to very low resolution.
  253. whatsapp_thumbnail: false
  254. # Allow invite permission for user. User can invite any bots to room with whatsapp
  255. # users (private chat and groups)
  256. allow_user_invite: {{ matrix_mautrix_whatsapp_bridge_allow_user_invite | to_json }}
  257. # Whether or not created rooms should have federation enabled.
  258. # If false, created portal rooms will never be federated.
  259. federate_rooms: {{ matrix_mautrix_whatsapp_federate_rooms|to_json }}
  260. # Whether to enable disappearing messages in groups. If enabled, then the expiration time of
  261. # the messages will be determined by the first user to read the message, rather than individually.
  262. # If the bridge only has a single user, this can be turned on safely.
  263. disappearing_messages_in_groups: false
  264. # Should the bridge never send alerts to the bridge management room?
  265. # These are mostly things like the user being logged out.
  266. disable_bridge_alerts: false
  267. # Should the bridge stop if the WhatsApp server says another user connected with the same session?
  268. # This is only safe on single-user bridges.
  269. crash_on_stream_replaced: false
  270. # Should the bridge detect URLs in outgoing messages, ask the homeserver to generate a preview,
  271. # and send it to WhatsApp? URL previews can always be sent using the `com.beeper.linkpreviews`
  272. # key in the event content even if this is disabled.
  273. url_previews: false
  274. # Send captions in the same message as images. This will send data compatible with both MSC2530 and MSC3552.
  275. # This is currently not supported in most clients.
  276. caption_in_message: false
  277. # Maximum time for handling Matrix events. Duration strings formatted for https://pkg.go.dev/time#ParseDuration
  278. # Null means there's no enforced timeout.
  279. message_handling_timeout:
  280. # Send an error message after this timeout, but keep waiting for the response until the deadline.
  281. # This is counted from the origin_server_ts, so the warning time is consistent regardless of the source of delay.
  282. # If the message is older than this when it reaches the bridge, the message won't be handled at all.
  283. error_after: null
  284. # Drop messages after this timeout. They may still go through if the message got sent to the servers.
  285. # This is counted from the time the bridge starts handling the message.
  286. deadline: 120s
  287. # The prefix for commands. Only required in non-management rooms.
  288. command_prefix: "{{ matrix_mautrix_whatsapp_command_prefix }}"
  289. # Messages sent upon joining a management room.
  290. # Markdown is supported. The defaults are listed below.
  291. management_room_text:
  292. # Sent when joining a room.
  293. welcome: "Hello, I'm a WhatsApp bridge bot."
  294. # Sent when joining a management room and the user is already logged in.
  295. welcome_connected: "Use `help` for help."
  296. # Sent when joining a management room and the user is not logged in.
  297. welcome_unconnected: "Use `help` for help or `login` to log in."
  298. # Optional extra text sent when joining a management room.
  299. additional_help: ""
  300. # End-to-bridge encryption support options.
  301. #
  302. # See https://docs.mau.fi/bridges/general/end-to-bridge-encryption.html for more info.
  303. encryption:
  304. # Allow encryption, work in group chat rooms with e2ee enabled
  305. allow: {{ matrix_mautrix_whatsapp_bridge_encryption_allow|to_json }}
  306. # Default to encryption, force-enable encryption in all portals the bridge creates
  307. # This will cause the bridge bot to be in private chats for the encryption to work properly.
  308. # It is recommended to also set private_chat_portal_meta to true when using this.
  309. default: {{ matrix_mautrix_whatsapp_bridge_encryption_default|to_json }}
  310. # Whether to use MSC2409/MSC3202 instead of /sync long polling for receiving encryption-related data.
  311. appservice: false
  312. # Require encryption, drop any unencrypted messages.
  313. require: false
  314. # Enable key sharing? If enabled, key requests for rooms where users are in will be fulfilled.
  315. # You must use a client that supports requesting keys from other users to use this feature.
  316. allow_key_sharing: {{ matrix_mautrix_whatsapp_bridge_encryption_key_sharing_allow|to_json }}
  317. # What level of device verification should be required from users?
  318. #
  319. # Valid levels:
  320. # unverified - Send keys to all device in the room.
  321. # cross-signed-untrusted - Require valid cross-signing, but trust all cross-signing keys.
  322. # cross-signed-tofu - Require valid cross-signing, trust cross-signing keys on first use (and reject changes).
  323. # cross-signed-verified - Require valid cross-signing, plus a valid user signature from the bridge bot.
  324. # Note that creating user signatures from the bridge bot is not currently possible.
  325. # verified - Require manual per-device verification
  326. # (currently only possible by modifying the `trust` column in the `crypto_device` database table).
  327. verification_levels:
  328. # Minimum level for which the bridge should send keys to when bridging messages from WhatsApp to Matrix.
  329. receive: unverified
  330. # Minimum level that the bridge should accept for incoming Matrix messages.
  331. send: unverified
  332. # Minimum level that the bridge should require for accepting key requests.
  333. share: cross-signed-tofu
  334. # Options for Megolm room key rotation. These options allow you to
  335. # configure the m.room.encryption event content. See:
  336. # https://spec.matrix.org/v1.3/client-server-api/#mroomencryption for
  337. # more information about that event.
  338. rotation:
  339. # Enable custom Megolm room key rotation settings. Note that these
  340. # settings will only apply to rooms created after this option is
  341. # set.
  342. enable_custom: false
  343. # The maximum number of milliseconds a session should be used
  344. # before changing it. The Matrix spec recommends 604800000 (a week)
  345. # as the default.
  346. milliseconds: 604800000
  347. # The maximum number of messages that should be sent with a given a
  348. # session before changing it. The Matrix spec recommends 100 as the
  349. # default.
  350. messages: 100
  351. # Settings for provisioning API
  352. provisioning:
  353. # Prefix for the provisioning API paths.
  354. prefix: /_matrix/provision
  355. # Shared secret for authentication. If set to "generate", a random secret will be generated,
  356. # or if set to "disable", the provisioning API will be disabled.
  357. shared_secret: generate
  358. # Permissions for using the bridge.
  359. # Permitted values:
  360. # relay - Talk through the relaybot (if enabled), no access otherwise
  361. # user - Access to use the bridge to chat with a WhatsApp account.
  362. # admin - User level and some additional administration tools
  363. # Permitted keys:
  364. # * - All Matrix users
  365. # domain - All users on that homeserver
  366. # mxid - Specific user
  367. permissions: {{ matrix_mautrix_whatsapp_bridge_permissions|to_json }}
  368. # Settings for relay mode
  369. relay:
  370. # Whether relay mode should be allowed. If allowed, `!wa set-relay` can be used to turn any
  371. # authenticated user into a relaybot for that chat.
  372. enabled: false
  373. # Should only admins be allowed to set themselves as relay users?
  374. admin_only: true
  375. # The formats to use when sending messages to WhatsApp via the relaybot.
  376. message_formats:
  377. m.text: "<b>{{ '{{ .Sender.Displayname }}' }}</b>: {{ '{{ .Message }}' }}"
  378. m.notice: "<b>{{ '{{ .Sender.Displayname }}' }}</b>:: {{ '{{ .Message }}' }}"
  379. m.emote: "* <b>{{ '{{ .Sender.Displayname }}' }}</b>: {{ '{{ .Message }}' }}"
  380. m.file: "<b>{{ '{{ .Sender.Displayname }}' }}</b>: sent a file"
  381. m.image: "<b>{{ '{{ .Sender.Displayname }}' }}</b>: sent an image"
  382. m.audio: "<b>{{ '{{ .Sender.Displayname }}' }}</b>: sent an audio file"
  383. m.video: "<b>{{ '{{ .Sender.Displayname }}' }}</b>: sent a video"
  384. m.location: "<b>{{ '{{ .Sender.Displayname }}' }}</b>: sent a location"
  385. # Logging config.
  386. logging:
  387. # The directory for log files. Will be created if not found.
  388. directory: ./logs
  389. # Available variables: .Date for the file date and .Index for different log files on the same day.
  390. # Set this to null to disable logging to file.
  391. file_name_format: null
  392. # Date format for file names in the Go time format: https://golang.org/pkg/time/#pkg-constants
  393. file_date_format: "2006-01-02"
  394. # Log file permissions.
  395. file_mode: 0o600
  396. # Timestamp format for log entries in the Go time format.
  397. timestamp_format: "Jan _2, 2006 15:04:05"
  398. # Minimum severity for log messages printed to stdout/stderr. This doesn't affect the log file.
  399. # Options: debug, info, warn, error, fatal
  400. print_level: {{ matrix_mautrix_whatsapp_logging_level }}