Matrix Docker Ansible eploy
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

224 строки
12 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. # Application service host/registration related details.
  9. # Changing these values requires regeneration of the registration.
  10. # The URL to push real-time bridge status to.
  11. # If set, the bridge will make POST requests to this URL whenever a user's whatsapp connection state changes.
  12. # The bridge will use the appservice as_token to authorize requests.
  13. status_endpoint: "null"
  14. appservice:
  15. # The address that the homeserver can use to connect to this appservice.
  16. address: {{ matrix_mautrix_whatsapp_appservice_address }}
  17. # The hostname and port where this appservice should listen.
  18. hostname: 0.0.0.0
  19. port: 8080
  20. # Database config.
  21. database:
  22. # The database type. "sqlite3" and "postgres" are supported.
  23. type: {{ matrix_mautrix_whatsapp_appservice_database_type|to_json }}
  24. # The database URI.
  25. # SQLite: File name is enough. https://github.com/mattn/go-sqlite3#connection-string
  26. # Postgres: Connection string. For example, postgres://user:password@host/database
  27. uri: {{ matrix_mautrix_whatsapp_appservice_database_uri|to_json }}
  28. # Maximum number of connections. Mostly relevant for Postgres.
  29. max_open_conns: 20
  30. max_idle_conns: 2
  31. # The unique ID of this appservice.
  32. id: whatsapp
  33. # Appservice bot details.
  34. bot:
  35. # Username of the appservice bot.
  36. username: {{ matrix_mautrix_whatsapp_appservice_bot_username|to_json }}
  37. # Display name and avatar for bot. Set to "remove" to remove display name/avatar, leave empty
  38. # to leave display name/avatar as-is.
  39. displayname: WhatsApp bridge bot
  40. avatar: mxc://maunium.net/NeXNQarUbrlYBiPCpprYsRqr
  41. # Authentication tokens for AS <-> HS communication. Autogenerated; do not modify.
  42. as_token: "{{ matrix_mautrix_whatsapp_appservice_token }}"
  43. hs_token: "{{ matrix_mautrix_whatsapp_homeserver_token }}"
  44. # Bridge config
  45. bridge:
  46. # Localpart template of MXIDs for WhatsApp users.
  47. # {{ '{{.}}' }} is replaced with the phone number of the WhatsApp user.
  48. username_template: "{{ 'whatsapp_{{.}}' }}"
  49. displayname_template: "{{ '{{if .PushName}}{{.PushName}}{{else if .BusinessName}}{{.BusinessName}}{{else}}{{.JID}}{{end}} (WA)' }}"
  50. # Should the bridge send a read receipt from the bridge bot when a message has been sent to WhatsApp?
  51. delivery_receipts: false
  52. # Should incoming calls send a message to the Matrix room?
  53. call_start_notices: true
  54. # Should another user's cryptographic identity changing send a message to Matrix?
  55. identity_change_notices: false
  56. # Should a "reactions not yet supported" warning be sent to the Matrix room when a user reacts to a message?
  57. reaction_notices: true
  58. portal_message_buffer: 128
  59. # Settings for handling history sync payloads. These settings only apply right after login,
  60. # because the phone only sends the history sync data once, and there's no way to re-request it
  61. # (other than logging out and back in again).
  62. history_sync:
  63. # Should the bridge create portals for chats in the history sync payload?
  64. create_portals: true
  65. # Maximum age of chats in seconds to create portals for. Set to 0 to create portals for all chats in sync payload.
  66. max_age: 604800
  67. # Enable backfilling history sync payloads from WhatsApp using batch sending?
  68. # This requires a server with MSC2716 support, which is currently an experimental feature in synapse.
  69. # It can be enabled by setting experimental_features -> msc2716_enabled to true in homeserver.yaml.
  70. # Note that as of Synapse 1.46, there are still some bugs with the implementation, especially if using event persistence workers.
  71. backfill: false
  72. # Use double puppets for backfilling?
  73. # In order to use this, the double puppets must be in the appservice's user ID namespace
  74. # (because the bridge can't use the double puppet access token with batch sending).
  75. # This only affects double puppets on the local server, double puppets on other servers will never be used.
  76. # Doesn't work out of box with this playbook
  77. double_puppet_backfill: false
  78. # Should the bridge request a full sync from the phone when logging in?
  79. # This bumps the size of history syncs from 3 months to 1 year.
  80. request_full_sync: false
  81. user_avatar_sync: true
  82. # Should Matrix users leaving groups be bridged to WhatsApp?
  83. bridge_matrix_leave: true
  84. # Should the bridge sync with double puppeting to receive EDUs that aren't normally sent to appservices.
  85. sync_with_custom_puppets: true
  86. # Should the bridge update the m.direct account data event when double puppeting is enabled.
  87. # Note that updating the m.direct event is not atomic (except with mautrix-asmux)
  88. # and is therefore prone to race conditions.
  89. sync_direct_chat_list: false
  90. # When double puppeting is enabled, users can use `!wa toggle` to change whether
  91. # presence and read receipts are bridged. These settings set the default values.
  92. # Existing users won't be affected when these are changed.
  93. default_bridge_receipts: true
  94. default_bridge_presence: true
  95. # Servers to always allow double puppeting from
  96. double_puppet_server_map:
  97. "{{ matrix_mautrix_whatsapp_homeserver_domain }}": {{ matrix_mautrix_whatsapp_homeserver_address }}
  98. # Allow using double puppeting from any server with a valid client .well-known file.
  99. double_puppet_allow_discovery: false
  100. # Shared secrets for https://github.com/devture/matrix-synapse-shared-secret-auth
  101. #
  102. # If set, double puppeting will be enabled automatically for local users
  103. # instead of users having to find an access token and run `login-matrix`
  104. # manually.
  105. login_shared_secret_map: {{ matrix_mautrix_whatsapp_bridge_login_shared_secret_map|to_json }}
  106. # Should the bridge explicitly set the avatar and room name for private chat portal rooms?
  107. private_chat_portal_meta: false
  108. # Should Matrix m.notice-type messages be bridged?
  109. bridge_notices: true
  110. # Set this to true to tell the bridge to re-send m.bridge events to all rooms on the next run.
  111. # This field will automatically be changed back to false after it, except if the config file is not writable.
  112. resend_bridge_info: false
  113. # When using double puppeting, should muted chats be muted in Matrix?
  114. mute_bridging: false
  115. # When using double puppeting, should archived chats be moved to a specific tag in Matrix?
  116. # Note that WhatsApp unarchives chats when a message is received, which will also be mirrored to Matrix.
  117. # This can be set to a tag (e.g. m.lowpriority), or null to disable.
  118. archive_tag: null
  119. # Same as above, but for pinned chats. The favorite tag is called m.favourite
  120. pinned_tag: null
  121. # Should mute status and tags only be bridged when the portal room is created?
  122. tag_only_on_create: true
  123. # Should WhatsApp status messages be bridged into a Matrix room?
  124. # Disabling this won't affect already created status broadcast rooms.
  125. enable_status_broadcast: true
  126. # Should the status broadcast room be muted and moved into low priority by default?
  127. # This is only applied when creating the room, the user can unmute/untag it later.
  128. mute_status_broadcast: true
  129. # Should the bridge use thumbnails from WhatsApp?
  130. # They're disabled by default due to very low resolution.
  131. whatsapp_thumbnail: false
  132. # Allow invite permission for user. User can invite any bots to room with whatsapp
  133. # users (private chat and groups)
  134. allow_user_invite: false
  135. # Whether or not created rooms should have federation enabled.
  136. # If false, created portal rooms will never be federated.
  137. federate_rooms: {{ matrix_mautrix_whatsapp_federate_rooms|to_json }}
  138. # The prefix for commands. Only required in non-management rooms.
  139. command_prefix: "!wa"
  140. # Messages sent upon joining a management room.
  141. # Markdown is supported. The defaults are listed below.
  142. management_room_text:
  143. # Sent when joining a room.
  144. welcome: "Hello, I'm a WhatsApp bridge bot."
  145. # Sent when joining a management room and the user is already logged in.
  146. welcome_connected: "Use `help` for help."
  147. # Sent when joining a management room and the user is not logged in.
  148. welcome_unconnected: "Use `help` for help or `login` to log in."
  149. # Optional extra text sent when joining a management room.
  150. additional_help: ""
  151. # End-to-bridge encryption support options.
  152. #
  153. # See https://docs.mau.fi/bridges/general/end-to-bridge-encryption.html for more info.
  154. encryption:
  155. # Allow encryption, work in group chat rooms with e2ee enabled
  156. allow: false
  157. # Default to encryption, force-enable encryption in all portals the bridge creates
  158. # This will cause the bridge bot to be in private chats for the encryption to work properly.
  159. # It is recommended to also set private_chat_portal_meta to true when using this.
  160. default: false
  161. # Options for automatic key sharing.
  162. key_sharing:
  163. # Enable key sharing? If enabled, key requests for rooms where users are in will be fulfilled.
  164. # You must use a client that supports requesting keys from other users to use this feature.
  165. allow: false
  166. # Require the requesting device to have a valid cross-signing signature?
  167. # This doesn't require that the bridge has verified the device, only that the user has verified it.
  168. # Not yet implemented.
  169. require_cross_signing: false
  170. # Require devices to be verified by the bridge?
  171. # Verification by the bridge is not yet implemented.
  172. require_verification: true
  173. # Permissions for using the bridge.
  174. # Permitted values:
  175. # relay - Talk through the relaybot (if enabled), no access otherwise
  176. # user - Access to use the bridge to chat with a WhatsApp account.
  177. # admin - User level and some additional administration tools
  178. # Permitted keys:
  179. # * - All Matrix users
  180. # domain - All users on that homeserver
  181. # mxid - Specific user
  182. permissions:
  183. "{{ matrix_mautrix_whatsapp_homeserver_domain }}": user
  184. # Settings for relay mode
  185. relay:
  186. # Whether relay mode should be allowed. If allowed, `!wa set-relay` can be used to turn any
  187. # authenticated user into a relaybot for that chat.
  188. enabled: false
  189. # Should only admins be allowed to set themselves as relay users?
  190. admin_only: true
  191. # The formats to use when sending messages to WhatsApp via the relaybot.
  192. message_formats:
  193. m.text: "<b>{{ '{{ .Sender.Displayname }}' }}</b>: {{ '{{ .Message }}' }}"
  194. m.notice: "<b>{{ '{{ .Sender.Displayname }}' }}</b>:: {{ '{{ .Message }}' }}"
  195. m.emote: "* <b>{{ '{{ .Sender.Displayname }}' }}</b>: {{ '{{ .Message }}' }}"
  196. m.file: "<b>{{ '{{ .Sender.Displayname }}' }}</b>: sent a file"
  197. m.image: "<b>{{ '{{ .Sender.Displayname }}' }}</b>: sent an image"
  198. m.audio: "<b>{{ '{{ .Sender.Displayname }}' }}</b>: sent an audio file"
  199. m.video: "<b>{{ '{{ .Sender.Displayname }}' }}</b>: sent a video"
  200. m.location: "<b>{{ '{{ .Sender.Displayname }}' }}</b>: sent a location"
  201. # Logging config.
  202. logging:
  203. # The directory for log files. Will be created if not found.
  204. directory: ./logs
  205. # Available variables: .Date for the file date and .Index for different log files on the same day.
  206. file_name_format: "{{ '{{.Date}}-{{.Index}}.log' }}"
  207. # Date format for file names in the Go time format: https://golang.org/pkg/time/#pkg-constants
  208. file_date_format: "2006-01-02"
  209. # Log file permissions.
  210. file_mode: 0600
  211. # Timestamp format for log entries in the Go time format.
  212. timestamp_format: "Jan _2, 2006 15:04:05"
  213. # Minimum severity for log messages.
  214. # Options: debug, info, warn, error, fatal
  215. print_level: debug