Matrix Docker Ansible eploy
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 
 

266 wiersze
13 KiB

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