Matrix Docker Ansible eploy
Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 

459 linhas
26 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. ephemeral_events: true
  56. # Should incoming events be handled asynchronously?
  57. # This may be necessary for large public instances with lots of messages going through.
  58. # However, messages will not be guaranteed to be bridged in the same order they were sent in.
  59. async_transactions: false
  60. # Authentication tokens for AS <-> HS communication. Autogenerated; do not modify.
  61. as_token: "{{ matrix_mautrix_whatsapp_appservice_token }}"
  62. hs_token: "{{ matrix_mautrix_whatsapp_homeserver_token }}"
  63. # Prometheus config.
  64. metrics:
  65. # Enable prometheus metrics?
  66. enabled: {{ matrix_mautrix_whatsapp_metrics_enabled | to_json }}
  67. # IP and port where the metrics listener should be. The path is always /metrics
  68. listen: 0.0.0.0:8001
  69. # Config for things that are directly sent to WhatsApp.
  70. whatsapp:
  71. # Device name that's shown in the "WhatsApp Web" section in the mobile app.
  72. os_name: Mautrix-WhatsApp bridge
  73. # Browser name that determines the logo shown in the mobile app.
  74. # Must be "unknown" for a generic icon or a valid browser name if you want a specific icon.
  75. # List of valid browser names: https://github.com/tulir/whatsmeow/blob/8b34d886d543b72e5f4699cf5b2797f68d598f78/binary/proto/def.proto#L38-L51
  76. browser_name: unknown
  77. # Bridge config
  78. bridge:
  79. # Localpart template of MXIDs for WhatsApp users.
  80. # {{ '{{.}}' }} is replaced with the phone number of the WhatsApp user.
  81. username_template: "{{ 'whatsapp_{{.}}' }}"
  82. # Displayname template for WhatsApp users.
  83. # {{ '{{.PushName}}' }} - nickname set by the WhatsApp user
  84. # {{ '{{.BusinessName}}' }} - validated WhatsApp business name
  85. # {{ '{{.Phone}}' }} - phone number (international format)
  86. # The following variables are also available, but will cause problems on multi-user instances:
  87. # {{ '{{.FullName}}' }} - full name from contact list
  88. # {{ '{{.FirstName}}' }} - first name from contact list
  89. displayname_template: "{{ '{{or .BusinessName .PushName .JID}} (WhatsApp)' }}"
  90. # Should the bridge create a space for each logged-in user and add bridged rooms to it?
  91. # Users who logged in before turning this on should run `!wa sync space` to create and fill the space for the first time.
  92. personal_filtering_spaces: {{ matrix_mautrix_whatsapp_bridge_personal_filtering_spaces | to_json }}
  93. # Should the bridge send a read receipt from the bridge bot when a message has been sent to WhatsApp?
  94. delivery_receipts: false
  95. # Whether the bridge should send the message status as a custom com.beeper.message_send_status event.
  96. message_status_events: false
  97. # Whether the bridge should send error notices via m.notice events when a message fails to bridge.
  98. message_error_notices: true
  99. # Should incoming calls send a message to the Matrix room?
  100. call_start_notices: true
  101. # Should another user's cryptographic identity changing send a message to Matrix?
  102. identity_change_notices: false
  103. portal_message_buffer: 128
  104. # Settings for handling history sync payloads.
  105. history_sync:
  106. # Enable backfilling history sync payloads from WhatsApp?
  107. backfill: true
  108. # The maximum number of initial conversations that should be synced.
  109. # Other conversations will be backfilled on demand when receiving a message or when initiating a direct chat.
  110. max_initial_conversations: -1
  111. # Maximum number of messages to backfill in each conversation.
  112. # Set to -1 to disable limit.
  113. message_count: 50
  114. # Should the bridge request a full sync from the phone when logging in?
  115. # This bumps the size of history syncs from 3 months to 1 year.
  116. request_full_sync: false
  117. # Configuration parameters that are sent to the phone along with the request full sync flag.
  118. # By default (when the values are null or 0), the config isn't sent at all.
  119. full_sync_config:
  120. # Number of days of history to request.
  121. # The limit seems to be around 3 years, but using higher values doesn't break.
  122. days_limit: null
  123. # This is presumably the maximum size of the transferred history sync blob, which may affect what the phone includes in the blob.
  124. size_mb_limit: null
  125. # This is presumably the local storage quota, which may affect what the phone includes in the history sync blob.
  126. storage_quota_mb: null
  127. # If this value is greater than 0, then if the conversation's last message was more than
  128. # this number of hours ago, then the conversation will automatically be marked it as read.
  129. # Conversations that have a last message that is less than this number of hours ago will
  130. # have their unread status synced from WhatsApp.
  131. unread_hours_threshold: 0
  132. ###############################################################################
  133. # The settings below are only applicable for backfilling using batch sending, #
  134. # which is no longer supported in Synapse. #
  135. ###############################################################################
  136. # Settings for media requests. If the media expired, then it will not
  137. # be on the WA servers.
  138. # Media can always be requested by reacting with the ♻️ (recycle) emoji.
  139. # These settings determine if the media requests should be done
  140. # automatically during or after backfill.
  141. media_requests:
  142. # Should expired media be automatically requested from the server as
  143. # part of the backfill process?
  144. auto_request_media: true
  145. # Whether to request the media immediately after the media message
  146. # is backfilled ("immediate") or at a specific time of the day
  147. # ("local_time").
  148. request_method: immediate
  149. # If request_method is "local_time", what time should the requests
  150. # be sent (in minutes after midnight)?
  151. request_local_time: 120
  152. # Settings for immediate backfills. These backfills should generally be
  153. # small and their main purpose is to populate each of the initial chats
  154. # (as configured by max_initial_conversations) with a few messages so
  155. # that you can continue conversations without loosing context.
  156. immediate:
  157. # The number of concurrent backfill workers to create for immediate
  158. # backfills. Note that using more than one worker could cause the
  159. # room list to jump around since there are no guarantees about the
  160. # order in which the backfills will complete.
  161. worker_count: 1
  162. # The maximum number of events to backfill initially.
  163. max_events: 10
  164. # Settings for deferred backfills. The purpose of these backfills are
  165. # to fill in the rest of the chat history that was not covered by the
  166. # immediate backfills. These backfills generally should happen at a
  167. # slower pace so as not to overload the homeserver.
  168. # Each deferred backfill config should define a "stage" of backfill
  169. # (i.e. the last week of messages). The fields are as follows:
  170. # - start_days_ago: the number of days ago to start backfilling from.
  171. # To indicate the start of time, use -1. For example, for a week ago, use 7.
  172. # - max_batch_events: the number of events to send per batch.
  173. # - batch_delay: the number of seconds to wait before backfilling each batch.
  174. deferred:
  175. # Last Week
  176. - start_days_ago: 7
  177. max_batch_events: 20
  178. batch_delay: 5
  179. # Last Month
  180. - start_days_ago: 30
  181. max_batch_events: 50
  182. batch_delay: 10
  183. # Last 3 months
  184. - start_days_ago: 90
  185. max_batch_events: 100
  186. batch_delay: 10
  187. # The start of time
  188. - start_days_ago: -1
  189. max_batch_events: 500
  190. batch_delay: 10
  191. # Should puppet avatars be fetched from the server even if an avatar is already set?
  192. user_avatar_sync: true
  193. # Should Matrix users leaving groups be bridged to WhatsApp?
  194. bridge_matrix_leave: true
  195. # Should the bridge update the m.direct account data event when double puppeting is enabled.
  196. # Note that updating the m.direct event is not atomic (except with mautrix-asmux)
  197. # and is therefore prone to race conditions.
  198. sync_direct_chat_list: false
  199. # Should the bridge use MSC2867 to bridge manual "mark as unread"s from
  200. # WhatsApp and set the unread status on initial backfill?
  201. # This will only work on clients that support the m.marked_unread or
  202. # com.famedly.marked_unread room account data.
  203. sync_manual_marked_unread: true
  204. # When double puppeting is enabled, users can use `!wa toggle` to change whether
  205. # presence and read receipts are bridged. These settings set the default values.
  206. # Existing users won't be affected when these are changed.
  207. default_bridge_presence: true
  208. # Send the presence as "available" to whatsapp when users start typing on a portal.
  209. # This works as a workaround for homeservers that do not support presence, and allows
  210. # users to see when the whatsapp user on the other side is typing during a conversation.
  211. send_presence_on_typing: false
  212. # Should the bridge always send "active" delivery receipts (two gray ticks on WhatsApp)
  213. # even if the user isn't marked as online (e.g. when presence bridging isn't enabled)?
  214. #
  215. # By default, the bridge acts like WhatsApp web, which only sends active delivery
  216. # receipts when it's in the foreground.
  217. force_active_delivery_receipts: false
  218. # Servers to always allow double puppeting from
  219. double_puppet_server_map:
  220. "{{ matrix_mautrix_whatsapp_homeserver_domain }}": {{ matrix_mautrix_whatsapp_homeserver_address }}
  221. # Allow using double puppeting from any server with a valid client .well-known file.
  222. double_puppet_allow_discovery: false
  223. # Shared secrets for https://github.com/devture/matrix-synapse-shared-secret-auth
  224. #
  225. # If set, double puppeting will be enabled automatically for local users
  226. # instead of users having to find an access token and run `login-matrix`
  227. # manually.
  228. login_shared_secret_map: {{ matrix_mautrix_whatsapp_bridge_login_shared_secret_map|to_json }}
  229. # Should the bridge explicitly set the avatar and room name for private chat portal rooms?
  230. # This is implicitly enabled in encrypted rooms.
  231. private_chat_portal_meta: default
  232. # Should group members be synced in parallel? This makes member sync faster
  233. parallel_member_sync: false
  234. # Should Matrix m.notice-type messages be bridged?
  235. bridge_notices: true
  236. # Set this to true to tell the bridge to re-send m.bridge events to all rooms on the next run.
  237. # This field will automatically be changed back to false after it, except if the config file is not writable.
  238. resend_bridge_info: false
  239. # When using double puppeting, should muted chats be muted in Matrix?
  240. mute_bridging: {{ matrix_mautrix_whatsapp_bridge_mute_bridging | to_json }}
  241. # When using double puppeting, should archived chats be moved to a specific tag in Matrix?
  242. # Note that WhatsApp unarchives chats when a message is received, which will also be mirrored to Matrix.
  243. # This can be set to a tag (e.g. m.lowpriority), or null to disable.
  244. archive_tag: null
  245. # Same as above, but for pinned chats. The favorite tag is called m.favourite
  246. pinned_tag: null
  247. # Should mute status and tags only be bridged when the portal room is created?
  248. tag_only_on_create: true
  249. # Should WhatsApp status messages be bridged into a Matrix room?
  250. # Disabling this won't affect already created status broadcast rooms.
  251. enable_status_broadcast: {{ matrix_mautrix_whatsapp_bridge_enable_status_broadcast | to_json }}
  252. # Should sending WhatsApp status messages be allowed?
  253. # This can cause issues if the user has lots of contacts, so it's disabled by default.
  254. disable_status_broadcast_send: true
  255. # Should the status broadcast room be muted and moved into low priority by default?
  256. # This is only applied when creating the room, the user can unmute it later.
  257. mute_status_broadcast: true
  258. # Tag to apply to the status broadcast room.
  259. status_broadcast_tag: m.lowpriority
  260. # Should the bridge use thumbnails from WhatsApp?
  261. # They're disabled by default due to very low resolution.
  262. whatsapp_thumbnail: false
  263. # Allow invite permission for user. User can invite any bots to room with whatsapp
  264. # users (private chat and groups)
  265. allow_user_invite: {{ matrix_mautrix_whatsapp_bridge_allow_user_invite | to_json }}
  266. # Whether or not created rooms should have federation enabled.
  267. # If false, created portal rooms will never be federated.
  268. federate_rooms: {{ matrix_mautrix_whatsapp_federate_rooms|to_json }}
  269. # Should the bridge never send alerts to the bridge management room?
  270. # These are mostly things like the user being logged out.
  271. disable_bridge_alerts: false
  272. # Should the bridge stop if the WhatsApp server says another user connected with the same session?
  273. # This is only safe on single-user bridges.
  274. crash_on_stream_replaced: false
  275. # Should the bridge detect URLs in outgoing messages, ask the homeserver to generate a preview,
  276. # and send it to WhatsApp? URL previews can always be sent using the `com.beeper.linkpreviews`
  277. # key in the event content even if this is disabled.
  278. url_previews: false
  279. # Send captions in the same message as images. This will send data compatible with both MSC2530 and MSC3552.
  280. # This is currently not supported in most clients.
  281. caption_in_message: false
  282. # Send galleries as a single event? This is not an MSC (yet).
  283. beeper_galleries: false
  284. # Should polls be sent using MSC3381 event types?
  285. extev_polls: {{ matrix_mautrix_whatsapp_extev_polls | to_json }}
  286. # Should cross-chat replies from WhatsApp be bridged? Most servers and clients don't support this.
  287. cross_room_replies: false
  288. # Disable generating reply fallbacks? Some extremely bad clients still rely on them,
  289. # but they're being phased out and will be completely removed in the future.
  290. disable_reply_fallbacks: false
  291. # Maximum time for handling Matrix events. Duration strings formatted for https://pkg.go.dev/time#ParseDuration
  292. # Null means there's no enforced timeout.
  293. message_handling_timeout:
  294. # Send an error message after this timeout, but keep waiting for the response until the deadline.
  295. # This is counted from the origin_server_ts, so the warning time is consistent regardless of the source of delay.
  296. # If the message is older than this when it reaches the bridge, the message won't be handled at all.
  297. error_after: null
  298. # Drop messages after this timeout. They may still go through if the message got sent to the servers.
  299. # This is counted from the time the bridge starts handling the message.
  300. deadline: 120s
  301. # The prefix for commands. Only required in non-management rooms.
  302. command_prefix: "{{ matrix_mautrix_whatsapp_command_prefix }}"
  303. # Messages sent upon joining a management room.
  304. # Markdown is supported. The defaults are listed below.
  305. management_room_text:
  306. # Sent when joining a room.
  307. welcome: "Hello, I'm a WhatsApp bridge bot."
  308. # Sent when joining a management room and the user is already logged in.
  309. welcome_connected: "Use `help` for help."
  310. # Sent when joining a management room and the user is not logged in.
  311. welcome_unconnected: "Use `help` for help or `login` to log in."
  312. # Optional extra text sent when joining a management room.
  313. additional_help: ""
  314. # End-to-bridge encryption support options.
  315. #
  316. # See https://docs.mau.fi/bridges/general/end-to-bridge-encryption.html for more info.
  317. encryption:
  318. # Allow encryption, work in group chat rooms with e2ee enabled
  319. allow: {{ matrix_mautrix_whatsapp_bridge_encryption_allow|to_json }}
  320. # Default to encryption, force-enable encryption in all portals the bridge creates
  321. # This will cause the bridge bot to be in private chats for the encryption to work properly.
  322. # It is recommended to also set private_chat_portal_meta to true when using this.
  323. default: {{ matrix_mautrix_whatsapp_bridge_encryption_default|to_json }}
  324. # Whether to use MSC2409/MSC3202 instead of /sync long polling for receiving encryption-related data.
  325. appservice: false
  326. # Require encryption, drop any unencrypted messages.
  327. require: false
  328. # Enable key sharing? If enabled, key requests for rooms where users are in will be fulfilled.
  329. # You must use a client that supports requesting keys from other users to use this feature.
  330. allow_key_sharing: {{ matrix_mautrix_whatsapp_bridge_encryption_key_sharing_allow|to_json }}
  331. # Should users mentions be in the event wire content to enable the server to send push notifications?
  332. plaintext_mentions: false
  333. # Options for deleting megolm sessions from the bridge.
  334. delete_keys:
  335. # Beeper-specific: delete outbound sessions when hungryserv confirms
  336. # that the user has uploaded the key to key backup.
  337. delete_outbound_on_ack: false
  338. # Don't store outbound sessions in the inbound table.
  339. dont_store_outbound: false
  340. # Ratchet megolm sessions forward after decrypting messages.
  341. ratchet_on_decrypt: false
  342. # Delete fully used keys (index >= max_messages) after decrypting messages.
  343. delete_fully_used_on_decrypt: false
  344. # Delete previous megolm sessions from same device when receiving a new one.
  345. delete_prev_on_new_session: false
  346. # Delete megolm sessions received from a device when the device is deleted.
  347. delete_on_device_delete: false
  348. # Periodically delete megolm sessions when 2x max_age has passed since receiving the session.
  349. periodically_delete_expired: false
  350. # Delete inbound megolm sessions that don't have the received_at field used for
  351. # automatic ratcheting and expired session deletion. This is meant as a migration
  352. # to delete old keys prior to the bridge update.
  353. delete_outdated_inbound: false
  354. # What level of device verification should be required from users?
  355. #
  356. # Valid levels:
  357. # unverified - Send keys to all device in the room.
  358. # cross-signed-untrusted - Require valid cross-signing, but trust all cross-signing keys.
  359. # cross-signed-tofu - Require valid cross-signing, trust cross-signing keys on first use (and reject changes).
  360. # cross-signed-verified - Require valid cross-signing, plus a valid user signature from the bridge bot.
  361. # Note that creating user signatures from the bridge bot is not currently possible.
  362. # verified - Require manual per-device verification
  363. # (currently only possible by modifying the `trust` column in the `crypto_device` database table).
  364. verification_levels:
  365. # Minimum level for which the bridge should send keys to when bridging messages from WhatsApp to Matrix.
  366. receive: unverified
  367. # Minimum level that the bridge should accept for incoming Matrix messages.
  368. send: unverified
  369. # Minimum level that the bridge should require for accepting key requests.
  370. share: cross-signed-tofu
  371. # Options for Megolm room key rotation. These options allow you to
  372. # configure the m.room.encryption event content. See:
  373. # https://spec.matrix.org/v1.3/client-server-api/#mroomencryption for
  374. # more information about that event.
  375. rotation:
  376. # Enable custom Megolm room key rotation settings. Note that these
  377. # settings will only apply to rooms created after this option is
  378. # set.
  379. enable_custom: false
  380. # The maximum number of milliseconds a session should be used
  381. # before changing it. The Matrix spec recommends 604800000 (a week)
  382. # as the default.
  383. milliseconds: 604800000
  384. # The maximum number of messages that should be sent with a given a
  385. # session before changing it. The Matrix spec recommends 100 as the
  386. # default.
  387. messages: 100
  388. # Disable rotating keys when a user's devices change?
  389. # You should not enable this option unless you understand all the implications.
  390. disable_device_change_key_rotation: false
  391. # Settings for provisioning API
  392. provisioning:
  393. # Prefix for the provisioning API paths.
  394. prefix: /_matrix/provision
  395. # Shared secret for authentication. If set to "generate", a random secret will be generated,
  396. # or if set to "disable", the provisioning API will be disabled.
  397. shared_secret: generate
  398. # Permissions for using the bridge.
  399. # Permitted values:
  400. # relay - Talk through the relaybot (if enabled), no access otherwise
  401. # user - Access to use the bridge to chat with a WhatsApp account.
  402. # admin - User level and some additional administration tools
  403. # Permitted keys:
  404. # * - All Matrix users
  405. # domain - All users on that homeserver
  406. # mxid - Specific user
  407. permissions: {{ matrix_mautrix_whatsapp_bridge_permissions|to_json }}
  408. # Settings for relay mode
  409. relay:
  410. # Whether relay mode should be allowed. If allowed, `!wa set-relay` can be used to turn any
  411. # authenticated user into a relaybot for that chat.
  412. enabled: {{ matrix_mautrix_whatsapp_bridge_relay_enabled | to_json }}
  413. # Should only admins be allowed to set themselves as relay users?
  414. admin_only: {{ matrix_mautrix_whatsapp_bridge_relay_admin_only | to_json }}
  415. # The formats to use when sending messages to WhatsApp via the relaybot.
  416. message_formats:
  417. m.text: "<b>{{ '{{ .Sender.Displayname }}' }}</b>: {{ '{{ .Message }}' }}"
  418. m.notice: "<b>{{ '{{ .Sender.Displayname }}' }}</b>:: {{ '{{ .Message }}' }}"
  419. m.emote: "* <b>{{ '{{ .Sender.Displayname }}' }}</b>: {{ '{{ .Message }}' }}"
  420. m.file: "<b>{{ '{{ .Sender.Displayname }}' }}</b>: sent a file"
  421. m.image: "<b>{{ '{{ .Sender.Displayname }}' }}</b>: sent an image"
  422. m.audio: "<b>{{ '{{ .Sender.Displayname }}' }}</b>: sent an audio file"
  423. m.video: "<b>{{ '{{ .Sender.Displayname }}' }}</b>: sent a video"
  424. m.location: "<b>{{ '{{ .Sender.Displayname }}' }}</b>: sent a location"
  425. # Logging config.
  426. logging:
  427. # The directory for log files. Will be created if not found.
  428. directory: ./logs
  429. # Available variables: .Date for the file date and .Index for different log files on the same day.
  430. # Set this to null to disable logging to file.
  431. file_name_format: null
  432. # Date format for file names in the Go time format: https://golang.org/pkg/time/#pkg-constants
  433. file_date_format: "2006-01-02"
  434. # Log file permissions.
  435. file_mode: 0o600
  436. # Timestamp format for log entries in the Go time format.
  437. timestamp_format: "Jan _2, 2006 15:04:05"
  438. # Minimum severity for log messages printed to stdout/stderr. This doesn't affect the log file.
  439. # Options: debug, info, warn, error, fatal
  440. print_level: {{ matrix_mautrix_whatsapp_logging_level }}