Matrix Docker Ansible eploy
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
 

429 líneas
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: {{ matrix_mautrix_whatsapp_metrics_enabled | to_json }}
  66. # IP and port where the metrics listener should be. The path is always /metrics
  67. listen: 0.0.0.0: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. # If this value is greater than 0, then if the conversation's last
  144. # message was more than this number of hours ago, then the conversation
  145. # will automatically be marked it as read.
  146. # Conversations that have a last message that is less than this number
  147. # of hours ago will have their unread status synced from WhatsApp.
  148. unread_hours_threshold: 0
  149. # Settings for immediate backfills. These backfills should generally be
  150. # small and their main purpose is to populate each of the initial chats
  151. # (as configured by max_initial_conversations) with a few messages so
  152. # that you can continue conversations without loosing context.
  153. immediate:
  154. # The number of concurrent backfill workers to create for immediate
  155. # backfills. Note that using more than one worker could cause the
  156. # room list to jump around since there are no guarantees about the
  157. # order in which the backfills will complete.
  158. worker_count: 1
  159. # The maximum number of events to backfill initially.
  160. max_events: 10
  161. # Settings for deferred backfills. The purpose of these backfills are
  162. # to fill in the rest of the chat history that was not covered by the
  163. # immediate backfills. These backfills generally should happen at a
  164. # slower pace so as not to overload the homeserver.
  165. # Each deferred backfill config should define a "stage" of backfill
  166. # (i.e. the last week of messages). The fields are as follows:
  167. # - start_days_ago: the number of days ago to start backfilling from.
  168. # To indicate the start of time, use -1. For example, for a week ago, use 7.
  169. # - max_batch_events: the number of events to send per batch.
  170. # - batch_delay: the number of seconds to wait before backfilling each batch.
  171. deferred:
  172. # Last Week
  173. - start_days_ago: 7
  174. max_batch_events: 20
  175. batch_delay: 5
  176. # Last Month
  177. - start_days_ago: 30
  178. max_batch_events: 50
  179. batch_delay: 10
  180. # Last 3 months
  181. - start_days_ago: 90
  182. max_batch_events: 100
  183. batch_delay: 10
  184. # The start of time
  185. - start_days_ago: -1
  186. max_batch_events: 500
  187. batch_delay: 10
  188. # Should puppet avatars be fetched from the server even if an avatar is already set?
  189. user_avatar_sync: true
  190. # Should Matrix users leaving groups be bridged to WhatsApp?
  191. bridge_matrix_leave: true
  192. # Should the bridge sync with double puppeting to receive EDUs that aren't normally sent to appservices.
  193. sync_with_custom_puppets: true
  194. # Should the bridge update the m.direct account data event when double puppeting is enabled.
  195. # Note that updating the m.direct event is not atomic (except with mautrix-asmux)
  196. # and is therefore prone to race conditions.
  197. sync_direct_chat_list: false
  198. # Should the bridge use MSC2867 to bridge manual "mark as unread"s from
  199. # WhatsApp and set the unread status on initial backfill?
  200. # This will only work on clients that support the m.marked_unread or
  201. # com.famedly.marked_unread room account data.
  202. sync_manual_marked_unread: true
  203. # When double puppeting is enabled, users can use `!wa toggle` to change whether
  204. # presence and read receipts are bridged. These settings set the default values.
  205. # Existing users won't be affected when these are changed.
  206. default_bridge_receipts: true
  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: false
  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. # Whether to enable disappearing messages in groups. If enabled, then the expiration time of
  270. # the messages will be determined by the first user to read the message, rather than individually.
  271. # If the bridge only has a single user, this can be turned on safely.
  272. disappearing_messages_in_groups: false
  273. # Should the bridge never send alerts to the bridge management room?
  274. # These are mostly things like the user being logged out.
  275. disable_bridge_alerts: false
  276. # Should the bridge stop if the WhatsApp server says another user connected with the same session?
  277. # This is only safe on single-user bridges.
  278. crash_on_stream_replaced: false
  279. # Should the bridge detect URLs in outgoing messages, ask the homeserver to generate a preview,
  280. # and send it to WhatsApp? URL previews can always be sent using the `com.beeper.linkpreviews`
  281. # key in the event content even if this is disabled.
  282. url_previews: false
  283. # Send captions in the same message as images. This will send data compatible with both MSC2530 and MSC3552.
  284. # This is currently not supported in most clients.
  285. caption_in_message: false
  286. # Should polls be sent using MSC3381 event types?
  287. extev_polls: false
  288. # Should Matrix edits be bridged to WhatsApp edits?
  289. # Official WhatsApp clients don't render edits yet, but once they do, the bridge should work with them right away.
  290. send_whatsapp_edits: 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. # What level of device verification should be required from users?
  332. #
  333. # Valid levels:
  334. # unverified - Send keys to all device in the room.
  335. # cross-signed-untrusted - Require valid cross-signing, but trust all cross-signing keys.
  336. # cross-signed-tofu - Require valid cross-signing, trust cross-signing keys on first use (and reject changes).
  337. # cross-signed-verified - Require valid cross-signing, plus a valid user signature from the bridge bot.
  338. # Note that creating user signatures from the bridge bot is not currently possible.
  339. # verified - Require manual per-device verification
  340. # (currently only possible by modifying the `trust` column in the `crypto_device` database table).
  341. verification_levels:
  342. # Minimum level for which the bridge should send keys to when bridging messages from WhatsApp to Matrix.
  343. receive: unverified
  344. # Minimum level that the bridge should accept for incoming Matrix messages.
  345. send: unverified
  346. # Minimum level that the bridge should require for accepting key requests.
  347. share: cross-signed-tofu
  348. # Options for Megolm room key rotation. These options allow you to
  349. # configure the m.room.encryption event content. See:
  350. # https://spec.matrix.org/v1.3/client-server-api/#mroomencryption for
  351. # more information about that event.
  352. rotation:
  353. # Enable custom Megolm room key rotation settings. Note that these
  354. # settings will only apply to rooms created after this option is
  355. # set.
  356. enable_custom: false
  357. # The maximum number of milliseconds a session should be used
  358. # before changing it. The Matrix spec recommends 604800000 (a week)
  359. # as the default.
  360. milliseconds: 604800000
  361. # The maximum number of messages that should be sent with a given a
  362. # session before changing it. The Matrix spec recommends 100 as the
  363. # default.
  364. messages: 100
  365. # Settings for provisioning API
  366. provisioning:
  367. # Prefix for the provisioning API paths.
  368. prefix: /_matrix/provision
  369. # Shared secret for authentication. If set to "generate", a random secret will be generated,
  370. # or if set to "disable", the provisioning API will be disabled.
  371. shared_secret: generate
  372. # Permissions for using the bridge.
  373. # Permitted values:
  374. # relay - Talk through the relaybot (if enabled), no access otherwise
  375. # user - Access to use the bridge to chat with a WhatsApp account.
  376. # admin - User level and some additional administration tools
  377. # Permitted keys:
  378. # * - All Matrix users
  379. # domain - All users on that homeserver
  380. # mxid - Specific user
  381. permissions: {{ matrix_mautrix_whatsapp_bridge_permissions|to_json }}
  382. # Settings for relay mode
  383. relay:
  384. # Whether relay mode should be allowed. If allowed, `!wa set-relay` can be used to turn any
  385. # authenticated user into a relaybot for that chat.
  386. enabled: {{ matrix_mautrix_whatsapp_bridge_relay_enabled | to_json }}
  387. # Should only admins be allowed to set themselves as relay users?
  388. admin_only: {{ matrix_mautrix_whatsapp_bridge_relay_admin_only | to_json }}
  389. # The formats to use when sending messages to WhatsApp via the relaybot.
  390. message_formats:
  391. m.text: "<b>{{ '{{ .Sender.Displayname }}' }}</b>: {{ '{{ .Message }}' }}"
  392. m.notice: "<b>{{ '{{ .Sender.Displayname }}' }}</b>:: {{ '{{ .Message }}' }}"
  393. m.emote: "* <b>{{ '{{ .Sender.Displayname }}' }}</b>: {{ '{{ .Message }}' }}"
  394. m.file: "<b>{{ '{{ .Sender.Displayname }}' }}</b>: sent a file"
  395. m.image: "<b>{{ '{{ .Sender.Displayname }}' }}</b>: sent an image"
  396. m.audio: "<b>{{ '{{ .Sender.Displayname }}' }}</b>: sent an audio file"
  397. m.video: "<b>{{ '{{ .Sender.Displayname }}' }}</b>: sent a video"
  398. m.location: "<b>{{ '{{ .Sender.Displayname }}' }}</b>: sent a location"
  399. # Logging config.
  400. logging:
  401. # The directory for log files. Will be created if not found.
  402. directory: ./logs
  403. # Available variables: .Date for the file date and .Index for different log files on the same day.
  404. # Set this to null to disable logging to file.
  405. file_name_format: null
  406. # Date format for file names in the Go time format: https://golang.org/pkg/time/#pkg-constants
  407. file_date_format: "2006-01-02"
  408. # Log file permissions.
  409. file_mode: 0o600
  410. # Timestamp format for log entries in the Go time format.
  411. timestamp_format: "Jan _2, 2006 15:04:05"
  412. # Minimum severity for log messages printed to stdout/stderr. This doesn't affect the log file.
  413. # Options: debug, info, warn, error, fatal
  414. print_level: {{ matrix_mautrix_whatsapp_logging_level }}