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

260 строки
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_facebook_homeserver_address }}
  6. # The domain of the homeserver (for MXIDs, etc).
  7. domain: {{ matrix_mautrix_facebook_homeserver_domain }}
  8. # Whether or not to verify the SSL certificate of the homeserver.
  9. # Only applies if address starts with https://
  10. verify_ssl: true
  11. # Whether or not the homeserver supports asmux-specific endpoints,
  12. # such as /_matrix/client/unstable/net.maunium.asmux/dms for atomically
  13. # updating m.direct.
  14. asmux: false
  15. # Whether asynchronous uploads via MSC2246 should be enabled for media.
  16. # Requires a media repo that supports MSC2246.
  17. async_media: false
  18. # Application service host/registration related details
  19. # Changing these values requires regeneration of the registration.
  20. appservice:
  21. # The address that the homeserver can use to connect to this appservice.
  22. address: {{ matrix_mautrix_facebook_appservice_address }}
  23. # The hostname and port where this appservice should listen.
  24. hostname: 0.0.0.0
  25. port: 29319
  26. # The maximum body size of appservice API requests (from the homeserver) in mebibytes
  27. # Usually 1 is enough, but on high-traffic bridges you might need to increase this to avoid 413s
  28. max_body_size: 1
  29. # The full URI to the database. Only Postgres is currently supported.
  30. database: {{ matrix_mautrix_facebook_appservice_database|to_json }}
  31. # Public part of web server for out-of-Matrix interaction with the bridge.
  32. public:
  33. # Whether or not the public-facing endpoints should be enabled.
  34. enabled: {{ matrix_mautrix_facebook_appservice_public_enabled|to_json }}
  35. # The prefix to use in the public-facing endpoints.
  36. prefix: {{ matrix_mautrix_facebook_public_endpoint|to_json }}
  37. # The base URL where the public-facing endpoints are available. The prefix is not added
  38. # implicitly.
  39. external: {{ matrix_mautrix_facebook_appservice_public_external|to_json }}
  40. # Allow logging in within Matrix. If false, users can only log in using the web interface.
  41. allow_matrix_login: true
  42. # Segment API key to enable analytics tracking for web server endpoints. Set to null to disable.
  43. # Currently the only events are login start, success and fail.
  44. segment_key: null
  45. # The unique ID of this appservice.
  46. id: facebook
  47. # Username of the appservice bot.
  48. bot_username: {{ matrix_mautrix_facebook_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. bot_displayname: Facebook bridge bot
  52. bot_avatar: mxc://maunium.net/ygtkteZsXnGJLJHRchUwYWak
  53. # Authentication tokens for AS <-> HS communication.
  54. as_token: "{{ matrix_mautrix_facebook_appservice_token }}"
  55. hs_token: "{{ matrix_mautrix_facebook_homeserver_token }}"
  56. # Prometheus telemetry config. Requires prometheus-client to be installed.
  57. metrics:
  58. enabled: {{ matrix_mautrix_facebook_metrics_enabled | to_json }}
  59. listen_port: 8000
  60. # Bridge config
  61. bridge:
  62. # Localpart template of MXIDs for Facebook users.
  63. # {userid} is replaced with the user ID of the Facebook user.
  64. username_template: "facebook_{userid}"
  65. # Displayname template for Facebook users.
  66. # {displayname} is replaced with the display name of the Facebook user
  67. # as defined below in displayname_preference.
  68. # Keys available for displayname_preference are also available here.
  69. displayname_template: '{displayname} (FB)'
  70. # Available keys:
  71. # "name" (full name)
  72. # "first_name"
  73. # "last_name"
  74. # "nickname"
  75. # "own_nickname" (user-specific!)
  76. displayname_preference:
  77. - name
  78. - first_name
  79. # The prefix for commands. Only required in non-management rooms.
  80. command_prefix: "{{ matrix_mautrix_facebook_command_prefix }}"
  81. # Number of chats to sync (and create portals for) on startup/login.
  82. # Set 0 to disable automatic syncing.
  83. initial_chat_sync: 10
  84. # Whether or not the Facebook users of logged in Matrix users should be
  85. # invited to private chats when the user sends a message from another client.
  86. invite_own_puppet_to_pm: false
  87. # Whether or not to use /sync to get presence, read receipts and typing notifications
  88. # when double puppeting is enabled
  89. sync_with_custom_puppets: true
  90. # Whether or not to update the m.direct account data event when double puppeting is enabled.
  91. # Note that updating the m.direct event is not atomic (except with mautrix-asmux)
  92. # and is therefore prone to race conditions.
  93. sync_direct_chat_list: false
  94. # Servers to always allow double puppeting from
  95. double_puppet_server_map: {}
  96. # example.com: https://example.com
  97. # Allow using double puppeting from any server with a valid client .well-known file.
  98. double_puppet_allow_discovery: false
  99. # Shared secrets for https://github.com/devture/matrix-synapse-shared-secret-auth
  100. #
  101. # If set, custom puppets will be enabled automatically for local users
  102. # instead of users having to find an access token and run `login-matrix`
  103. # manually.
  104. # If using this for other servers than the bridge's server,
  105. # you must also set the URL in the double_puppet_server_map.
  106. login_shared_secret_map: {{ matrix_mautrix_facebook_bridge_login_shared_secret_map|to_json }}
  107. # Should presence from Facebook be bridged? This doesn't use the same API as the Android app,
  108. # so it might be more suspicious to Facebook.
  109. presence_from_facebook: {{ matrix_mautrix_facebook_bridge_presence|to_json }}
  110. # Whether or not to update avatars when syncing all contacts at startup.
  111. update_avatar_initial_sync: true
  112. # End-to-bridge encryption support options. These require matrix-nio to be installed with pip
  113. # and login_shared_secret to be configured in order to get a device for the bridge bot.
  114. #
  115. # Additionally, https://github.com/matrix-org/synapse/pull/5758 is required if using a normal
  116. # application service.
  117. encryption:
  118. # Allow encryption, work in group chat rooms with e2ee enabled
  119. allow: false
  120. # Default to encryption, force-enable encryption in all portals the bridge creates
  121. # This will cause the bridge bot to be in private chats for the encryption to work properly.
  122. default: false
  123. # Options for automatic key sharing.
  124. key_sharing:
  125. # Enable key sharing? If enabled, key requests for rooms where users are in will be fulfilled.
  126. # You must use a client that supports requesting keys from other users to use this feature.
  127. allow: false
  128. # Require the requesting device to have a valid cross-signing signature?
  129. # This doesn't require that the bridge has verified the device, only that the user has verified it.
  130. # Not yet implemented.
  131. require_cross_signing: false
  132. # Require devices to be verified by the bridge?
  133. # Verification by the bridge is not yet implemented.
  134. require_verification: true
  135. # Whether or not the bridge should send a read receipt from the bridge bot when a message has
  136. # been sent to Facebook.
  137. delivery_receipts: false
  138. # Whether to allow inviting arbitrary mxids to portal rooms
  139. allow_invites: false
  140. # Whether or not created rooms should have federation enabled.
  141. # If false, created portal rooms will never be federated.
  142. federate_rooms: {{ matrix_mautrix_facebook_federate_rooms|to_json }}
  143. # Settings for backfilling messages from Facebook.
  144. backfill:
  145. # Whether or not the Facebook users of logged in Matrix users should be
  146. # invited to private chats when backfilling history from Facebook. This is
  147. # usually needed to prevent rate limits and to allow timestamp massaging.
  148. invite_own_puppet: true
  149. # Maximum number of messages to backfill initially.
  150. # Set to 0 to disable backfilling when creating portal.
  151. initial_limit: 0
  152. # Maximum number of messages to backfill if messages were missed while
  153. # the bridge was disconnected.
  154. # Set to 0 to disable backfilling missed messages.
  155. missed_limit: 1000
  156. # If using double puppeting, should notifications be disabled
  157. # while the initial backfill is in progress?
  158. disable_notifications: false
  159. periodic_reconnect:
  160. # Interval in seconds in which to automatically reconnect all users.
  161. # This can be used to automatically mitigate the bug where Facebook stops sending messages.
  162. # Set to -1 to disable periodic reconnections entirely.
  163. interval: -1
  164. # What to do in periodic reconnects. Either "refresh" or "reconnect"
  165. mode: refresh
  166. # Should even disconnected users be reconnected?
  167. always: false
  168. # The number of seconds that a disconnection can last without triggering an automatic re-sync
  169. # and missed message backfilling when reconnecting.
  170. # Set to 0 to always re-sync, or -1 to never re-sync automatically.
  171. resync_max_disconnected_time: 5
  172. # Should the bridge do a resync on startup?
  173. sync_on_startup: true
  174. # Whether or not temporary disconnections should send notices to the notice room.
  175. # If this is false, disconnections will never send messages and connections will only send
  176. # messages if it was disconnected for more than resync_max_disconnected_time seconds.
  177. temporary_disconnect_notices: false
  178. # Whether or not the bridge should try to "refresh" the connection if a normal reconnection
  179. # attempt fails.
  180. refresh_on_reconnection_fail: false
  181. # Set this to true to tell the bridge to re-send m.bridge events to all rooms on the next run.
  182. # This field will automatically be changed back to false after it,
  183. # except if the config file is not writable.
  184. resend_bridge_info: false
  185. # Permissions for using the bridge.
  186. # Permitted values:
  187. # user - Use the bridge with puppeting.
  188. # admin - Use and administrate the bridge.
  189. # Permitted keys:
  190. # * - All Matrix users
  191. # domain - All users on that homeserver
  192. # mxid - Specific user
  193. permissions: {{ matrix_mautrix_facebook_bridge_permissions|to_json }}
  194. relay:
  195. # Whether relay mode should be allowed. If allowed, `!fb set-relay` can be used to turn any
  196. # authenticated user into a relaybot for that chat.
  197. enabled: false
  198. # The formats to use when sending messages to Messenger via a relay user.
  199. #
  200. # Available variables:
  201. # $sender_displayname - The display name of the sender (e.g. Example User)
  202. # $sender_username - The username (Matrix ID localpart) of the sender (e.g. exampleuser)
  203. # $sender_mxid - The Matrix ID of the sender (e.g. @exampleuser:example.com)
  204. # $message - The message content
  205. message_formats:
  206. m.text: '<b>$sender_displayname</b>: $message'
  207. m.notice: '<b>$sender_displayname</b>: $message'
  208. m.emote: '* <b>$sender_displayname</b> $message'
  209. m.file: '<b>$sender_displayname</b> sent a file'
  210. m.image: '<b>$sender_displayname</b> sent an image'
  211. m.audio: '<b>$sender_displayname</b> sent an audio file'
  212. m.video: '<b>$sender_displayname</b> sent a video'
  213. m.location: '<b>$sender_displayname</b> sent a location'
  214. facebook:
  215. device_seed: generate
  216. default_region_hint: ODN
  217. connection_type: WIFI
  218. carrier: Verizon
  219. hni: 311390
  220. # Python logging configuration.
  221. #
  222. # See section 16.7.2 of the Python documentation for more info:
  223. # https://docs.python.org/3.6/library/logging.config.html#configuration-dictionary-schema
  224. logging:
  225. version: 1
  226. formatters:
  227. colored:
  228. (): mautrix_facebook.util.ColorFormatter
  229. format: "[%(asctime)s] [%(levelname)s@%(name)s] %(message)s"
  230. normal:
  231. format: "[%(asctime)s] [%(levelname)s@%(name)s] %(message)s"
  232. handlers:
  233. console:
  234. class: logging.StreamHandler
  235. formatter: colored
  236. loggers:
  237. mau:
  238. level: {{ matrix_mautrix_facebook_logging_level|to_json }}
  239. paho:
  240. level: {{ matrix_mautrix_facebook_logging_level|to_json }}
  241. aiohttp:
  242. level: {{ matrix_mautrix_facebook_logging_level|to_json }}
  243. root:
  244. level: {{ matrix_mautrix_facebook_logging_level|to_json }}
  245. handlers: [console]