Matrix Docker Ansible eploy
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
 
 

349 rader
18 KiB

  1. {#
  2. SPDX-FileCopyrightText: 2024 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_beeper_linkedin_homeserver_address | to_json }}
  10. # The domain of the homeserver (for MXIDs, etc).
  11. domain: {{ matrix_beeper_linkedin_homeserver_domain | to_json }}
  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. # What software is the homeserver running?
  16. # Standard Matrix homeservers like Synapse, Dendrite and Conduit should just use "standard" here.
  17. software: standard
  18. # Number of retries for all HTTP requests if the homeserver isn't reachable.
  19. http_retry_count: 4
  20. # The URL to push real-time bridge status to.
  21. # If set, the bridge will make POST requests to this URL whenever a user's Signal connection state changes.
  22. # The bridge will use the appservice as_token to authorize requests.
  23. status_endpoint: null
  24. # Endpoint for reporting per-message status.
  25. message_send_checkpoint_endpoint: null
  26. # Whether asynchronous uploads via MSC2246 should be enabled for media.
  27. # Requires a media repo that supports MSC2246.
  28. async_media: false
  29. # Application service host/registration related details
  30. # Changing these values requires regeneration of the registration.
  31. appservice:
  32. # The address that the homeserver can use to connect to this appservice.
  33. address: {{ matrix_beeper_linkedin_appservice_address | to_json }}
  34. # The hostname and port where this appservice should listen.
  35. hostname: 0.0.0.0
  36. port: 29319
  37. # The maximum body size of appservice API requests (from the homeserver) in mebibytes
  38. # Usually 1 is enough, but on high-traffic bridges you might need to increase this to avoid 413s
  39. max_body_size: 1
  40. # The full URI to the database. SQLite and Postgres are supported.
  41. # Format examples:
  42. # SQLite: sqlite:filename.db
  43. # Postgres: postgres://username:password@hostname/dbname
  44. database: {{ matrix_beeper_linkedin_appservice_database_uri | to_json }}
  45. # Additional arguments for asyncpg.create_pool() or sqlite3.connect()
  46. # https://magicstack.github.io/asyncpg/current/api/index.html#asyncpg.pool.create_pool
  47. # https://docs.python.org/3/library/sqlite3.html#sqlite3.connect
  48. # For sqlite, min_size is used as the connection thread pool size and max_size is ignored.
  49. # Additionally, SQLite supports init_commands as an array of SQL queries to run on connect (e.g. to set PRAGMAs).
  50. database_opts:
  51. min_size: 1
  52. max_size: 10
  53. # Provisioning API part of the web server for automated portal creation and fetching information.
  54. # Used by things like mautrix-manager (https://github.com/tulir/mautrix-manager).
  55. provisioning:
  56. # Whether or not the provisioning API should be enabled.
  57. enabled: {{ matrix_beeper_linkedin_provisioning_enabled | to_json }}
  58. # The prefix to use in the provisioning API endpoints.
  59. prefix: /_matrix/provision/v1
  60. # The shared secret to authorize users of the API.
  61. # Set to "generate" to generate and save a new token.
  62. shared_secret: {{ matrix_beeper_linkedin_provisioning_shared_secret | to_json }}
  63. # The unique ID of this appservice.
  64. id: beeper_linkedin
  65. # Username of the appservice bot.
  66. bot_username: {{ matrix_beeper_linkedin_appservice_bot_username | to_json }}
  67. # Display name and avatar for bot. Set to "remove" to remove display name/avatar, leave empty
  68. # to leave display name/avatar as-is.
  69. bot_displayname: {{ matrix_beeper_linkedin_appservice_bot_displayname | to_json }}
  70. bot_avatar: {{ matrix_beeper_linkedin_appservice_bot_avatar | to_json }}
  71. # Whether or not to receive ephemeral events via appservice transactions.
  72. # Requires MSC2409 support (i.e. Synapse 1.22+).
  73. # You should disable bridge -> sync_with_custom_puppets when this is enabled.
  74. ephemeral_events: false
  75. # Authentication tokens for AS <-> HS communication. Autogenerated; do not modify.
  76. as_token: {{ matrix_beeper_linkedin_appservice_token | to_json }}
  77. hs_token: {{ matrix_beeper_linkedin_homeserver_token | to_json }}
  78. # Segment-compatible analytics endpoint for tracking some events, like provisioning API login and encryption errors.
  79. analytics:
  80. # Hostname of the tracking server. The path is hardcoded to /v1/track
  81. host: api.segment.io
  82. # API key to send with tracking requests. Tracking is disabled if this is null.
  83. token: null
  84. # Optional user ID for tracking events. If null, defaults to using Matrix user ID.
  85. user_id: null
  86. # Prometheus telemetry config. Requires prometheus-client to be installed.
  87. metrics:
  88. enabled: false
  89. listen_port: 8000
  90. # Manhole config.
  91. manhole:
  92. # Whether or not opening the manhole is allowed.
  93. enabled: false
  94. # The path for the unix socket.
  95. path: /var/tmp/linkedin-matrix.manhole
  96. # The list of UIDs who can be added to the whitelist.
  97. # If empty, any UIDs can be specified in the open-manhole command.
  98. whitelist:
  99. - 0
  100. # Bridge config
  101. bridge:
  102. # Localpart template of MXIDs for LinkedIn users.
  103. # {userid} is replaced with the user ID of the LinkedIn user.
  104. username_template: "linkedin_{userid}"
  105. # Settings for creating a space for every user.
  106. space_support:
  107. # Whether or not to enable creating a space per user and inviting the
  108. # user (as well as all of the puppets) to that space.
  109. enable: {{ matrix_beeper_linkedin_bridge_space_support_enable | to_json }}
  110. # The name of the space
  111. name: "LinkedIn"
  112. # Displayname template for LinkedIn users.
  113. # {displayname} is replaced with the display name of the LinkedIn user
  114. # as defined below in displayname_preference.
  115. # Keys available for displayname_preference are also available here.
  116. displayname_template: "{displayname} (LinkedIn)"
  117. # Available keys:
  118. # "name" (full name)
  119. # "first_name"
  120. # "last_name"
  121. displayname_preference:
  122. - name
  123. - first_name
  124. # Whether or not to set the topic on DMs to the user's occupation and a
  125. # link to their profile.
  126. set_topic_on_dms: true
  127. # The prefix for commands. Only required in non-management rooms.
  128. command_prefix: {{ matrix_beeper_linkedin_command_prefix | to_json }}
  129. # Number of chats to sync (and create portals for) on startup/login.
  130. # Set 0 to disable automatic syncing.
  131. initial_chat_sync: 20
  132. # Whether or not the LinkedIn users of logged in Matrix users should be
  133. # invited to private chats when the user sends a message from another client.
  134. invite_own_puppet_to_pm: false
  135. # Whether or not to use /sync to get presence, read receipts and typing notifications
  136. # when double puppeting is enabled
  137. sync_with_custom_puppets: true
  138. # Whether or not to update the m.direct account data event when double puppeting is enabled.
  139. # Note that updating the m.direct event is not atomic (except with mautrix-asmux)
  140. # and is therefore prone to race conditions.
  141. sync_direct_chat_list: false
  142. # Servers to always allow double puppeting from
  143. double_puppet_server_map: {{ matrix_beeper_linkedin_bridge_double_puppet_server_map | to_json }}
  144. # Allow using double puppeting from any server with a valid client .well-known file.
  145. double_puppet_allow_discovery: false
  146. # Shared secrets for https://github.com/devture/matrix-synapse-shared-secret-auth
  147. #
  148. # If set, custom puppets will be enabled automatically for local users
  149. # instead of users having to find an access token and run `login-matrix`
  150. # manually.
  151. # If using this for other servers than the bridge's server,
  152. # you must also set the URL in the double_puppet_server_map.
  153. login_shared_secret_map: {{ matrix_beeper_linkedin_bridge_login_shared_secret_map | to_json }}
  154. # Whether or not to bridge presence in both directions. LinkedIn allows users not to broadcast
  155. # presence, but then it won't send other users' presence to the client.
  156. presence: {{ matrix_beeper_linkedin_bridge_presence | to_json }}
  157. # Whether or not to update avatars when syncing all contacts at startup.
  158. update_avatar_initial_sync: true
  159. # Whether or not created rooms should have federation enabled.
  160. # If false, created portal rooms will never be federated.
  161. federate_rooms: true
  162. # Whether to explicitly set the avatar and room name for private chat portal rooms.
  163. # If set to `default`, this will be enabled in encrypted rooms and disabled in unencrypted rooms.
  164. # If set to `always`, all DM rooms will have explicit names and avatars set.
  165. # If set to `never`, DM rooms will never have names and avatars set.
  166. private_chat_portal_meta: default
  167. # End-to-bridge encryption support options.
  168. #
  169. # See https://docs.mau.fi/bridges/general/end-to-bridge-encryption.html for more info.
  170. encryption:
  171. # Allow encryption, work in group chat rooms with e2ee enabled
  172. allow: {{ matrix_beeper_linkedin_bridge_encryption_allow | to_json }}
  173. # Default to encryption, force-enable encryption in all portals the bridge creates
  174. # This will cause the bridge bot to be in private chats for the encryption to work properly.
  175. default: {{ matrix_beeper_linkedin_bridge_encryption_default | to_json }}
  176. # Whether to use MSC2409/MSC3202 instead of /sync long polling for receiving encryption-related data.
  177. appservice: {{ matrix_beeper_linkedin_bridge_encryption_appservice | to_json }}
  178. # Require encryption, drop any unencrypted messages.
  179. require: {{ matrix_beeper_linkedin_bridge_encryption_require | to_json }}
  180. # Enable key sharing? If enabled, key requests for rooms where users are in will be fulfilled.
  181. # You must use a client that supports requesting keys from other users to use this feature.
  182. allow_key_sharing: {{ matrix_beeper_linkedin_bridge_encryption_key_sharing_allow | to_json }}
  183. # Options for deleting megolm sessions from the bridge.
  184. delete_keys:
  185. # Beeper-specific: delete outbound sessions when hungryserv confirms
  186. # that the user has uploaded the key to key backup.
  187. delete_outbound_on_ack: false
  188. # Don't store outbound sessions in the inbound table.
  189. dont_store_outbound: false
  190. # Ratchet megolm sessions forward after decrypting messages.
  191. ratchet_on_decrypt: false
  192. # Delete fully used keys (index >= max_messages) after decrypting messages.
  193. delete_fully_used_on_decrypt: false
  194. # Delete previous megolm sessions from same device when receiving a new one.
  195. delete_prev_on_new_session: false
  196. # Delete megolm sessions received from a device when the device is deleted.
  197. delete_on_device_delete: false
  198. # Periodically delete megolm sessions when 2x max_age has passed since receiving the session.
  199. periodically_delete_expired: false
  200. # Delete inbound megolm sessions that don't have the received_at field used for
  201. # automatic ratcheting and expired session deletion. This is meant as a migration
  202. # to delete old keys prior to the bridge update.
  203. delete_outdated_inbound: false
  204. # What level of device verification should be required from users?
  205. #
  206. # Valid levels:
  207. # unverified - Send keys to all device in the room.
  208. # cross-signed-untrusted - Require valid cross-signing, but trust all cross-signing keys.
  209. # cross-signed-tofu - Require valid cross-signing, trust cross-signing keys on first use (and reject changes).
  210. # cross-signed-verified - Require valid cross-signing, plus a valid user signature from the bridge bot.
  211. # Note that creating user signatures from the bridge bot is not currently possible.
  212. # verified - Require manual per-device verification
  213. # (currently only possible by modifying the `trust` column in the `crypto_device` database table).
  214. verification_levels:
  215. # Minimum level for which the bridge should send keys to when bridging messages from Telegram to Matrix.
  216. receive: unverified
  217. # Minimum level that the bridge should accept for incoming Matrix messages.
  218. send: unverified
  219. # Minimum level that the bridge should require for accepting key requests.
  220. share: cross-signed-tofu
  221. # Options for Megolm room key rotation. These options allow you to
  222. # configure the m.room.encryption event content. See:
  223. # https://spec.matrix.org/v1.3/client-server-api/#mroomencryption for
  224. # more information about that event.
  225. rotation:
  226. # Enable custom Megolm room key rotation settings. Note that these
  227. # settings will only apply to rooms created after this option is
  228. # set.
  229. enable_custom: false
  230. # The maximum number of milliseconds a session should be used
  231. # before changing it. The Matrix spec recommends 604800000 (a week)
  232. # as the default.
  233. milliseconds: 604800000
  234. # The maximum number of messages that should be sent with a given a
  235. # session before changing it. The Matrix spec recommends 100 as the
  236. # default.
  237. messages: 100
  238. # Disable rotating keys when a user's devices change?
  239. # You should not enable this option unless you understand all the implications.
  240. disable_device_change_key_rotation: false
  241. # Whether or not the bridge should send a read receipt from the bridge bot when a message has
  242. # been sent to LinkedIn.
  243. delivery_receipts: false
  244. # Whether to allow inviting arbitrary mxids to portal rooms
  245. allow_invites: false
  246. # Settings for backfilling messages from LinkedIn.
  247. backfill:
  248. # Whether or not the LinkedIn users of logged in Matrix users should be
  249. # invited to private chats when backfilling history from LinkedIn. This is
  250. # usually needed to prevent rate limits and to allow timestamp massaging.
  251. invite_own_puppet: true
  252. # Maximum number of messages to backfill initially.
  253. # Set to 0 to disable backfilling when creating portal.
  254. initial_limit: 0
  255. # Maximum number of messages to backfill if messages were missed while
  256. # the bridge was disconnected.
  257. # Set to 0 to disable backfilling missed messages.
  258. missed_limit: 1000
  259. # If using double puppeting, should notifications be disabled
  260. # while the initial backfill is in progress?
  261. disable_notifications: false
  262. # If this value is greater than 0, then (on backfill) if the
  263. # conversation's last message was more than this number of hours ago,
  264. # then the conversation will automatically be marked it as read.
  265. unread_hours_threshold: 0
  266. periodic_reconnect:
  267. # TODO needed?
  268. # Interval in seconds in which to automatically reconnect all users.
  269. # This can be used to automatically mitigate the bug where Linkedin stops sending messages.
  270. # Set to -1 to disable periodic reconnections entirely.
  271. interval: -1
  272. # What to do in periodic reconnects. Either "refresh" or "reconnect"
  273. mode: refresh
  274. # Should even disconnected users be reconnected?
  275. always: false
  276. # The number of seconds that a disconnection can last without triggering an automatic re-sync
  277. # and missed message backfilling when reconnecting.
  278. # Set to 0 to always re-sync, or -1 to never re-sync automatically.
  279. resync_max_disconnected_time: 5
  280. # Whether or not temporary disconnections should send notices to the notice room.
  281. # If this is false, disconnections will never send messages and connections will only send
  282. # messages if it was disconnected for more than resync_max_disconnected_time seconds.
  283. temporary_disconnect_notices: true
  284. # Whether or not the bridge should try to "refresh" the connection if a normal reconnection
  285. # attempt fails.
  286. refresh_on_reconnection_fail: false
  287. # Set this to true to tell the bridge to re-send m.bridge events to all rooms on the next run.
  288. # This field will automatically be changed back to false after it,
  289. # except if the config file is not writable.
  290. resend_bridge_info: false
  291. # When using double puppeting, should muted chats be muted in Matrix?
  292. mute_bridging: false
  293. # Whether or not mute status and tags should only be bridged when the portal room is created.
  294. tag_only_on_create: true
  295. # Permissions for using the bridge.
  296. # Permitted values:
  297. # user - Use the bridge with puppeting.
  298. # admin - Use and administrate the bridge.
  299. # Permitted keys:
  300. # * - All Matrix users
  301. # domain - All users on that homeserver
  302. # mxid - Specific user
  303. permissions: {{ matrix_beeper_linkedin_bridge_permissions | to_json }}
  304. # Python logging configuration.
  305. #
  306. # See section 16.7.2 of the Python documentation for more info:
  307. # https://docs.python.org/3.6/library/logging.config.html#configuration-dictionary-schema
  308. logging:
  309. version: 1
  310. formatters:
  311. colored:
  312. (): mautrix.util.logging.color.ColorFormatter
  313. format: "[%(asctime)s] [%(levelname)s@%(name)s] %(message)s"
  314. normal:
  315. format: "[%(asctime)s] [%(levelname)s@%(name)s] %(message)s"
  316. handlers:
  317. console:
  318. class: logging.StreamHandler
  319. formatter: colored
  320. loggers:
  321. mau:
  322. level: {{ matrix_beeper_linkedin_logging_level|to_json }}
  323. aiohttp:
  324. level: {{ matrix_beeper_linkedin_logging_level|to_json }}
  325. root:
  326. level: DEBUG
  327. handlers: [console]