Matrix Docker Ansible eploy
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 

663 lignes
34 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_telegram_homeserver_address }}
  6. # The domain of the homeserver (for MXIDs, etc).
  7. domain: {{ matrix_mautrix_telegram_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. # What software is the homeserver running?
  12. # Standard Matrix homeservers like Synapse, Dendrite and Conduit should just use "standard" here.
  13. software: standard
  14. # Number of retries for all HTTP requests if the homeserver isn't reachable.
  15. http_retry_count: 4
  16. # The URL to push real-time bridge status to.
  17. # If set, the bridge will make POST requests to this URL whenever a user's Telegram connection state changes.
  18. # The bridge will use the appservice as_token to authorize requests.
  19. status_endpoint: null
  20. # Endpoint for reporting per-message status.
  21. message_send_checkpoint_endpoint: null
  22. # Whether asynchronous uploads via MSC2246 should be enabled for media.
  23. # Requires a media repo that supports MSC2246.
  24. async_media: false
  25. # Application service host/registration related details
  26. # Changing these values requires regeneration of the registration.
  27. appservice:
  28. # The address that the homeserver can use to connect to this appservice.
  29. address: {{ matrix_mautrix_telegram_appservice_address|to_json }}
  30. # The hostname and port where this appservice should listen.
  31. hostname: 0.0.0.0
  32. port: 8080
  33. # The maximum body size of appservice API requests (from the homeserver) in mebibytes
  34. # Usually 1 is enough, but on high-traffic bridges you might need to increase this to avoid 413s
  35. max_body_size: 1
  36. # The full URI to the database. SQLite and Postgres are supported.
  37. # Format examples:
  38. # SQLite: sqlite:filename.db
  39. # Postgres: postgres://username:password@hostname/dbname
  40. database: {{ matrix_mautrix_telegram_appservice_database|to_json }}
  41. # Additional arguments for asyncpg.create_pool() or sqlite3.connect()
  42. # https://magicstack.github.io/asyncpg/current/api/index.html#asyncpg.pool.create_pool
  43. # https://docs.python.org/3/library/sqlite3.html#sqlite3.connect
  44. # For sqlite, min_size is used as the connection thread pool size and max_size is ignored.
  45. # Additionally, SQLite supports init_commands as an array of SQL queries to run on connect (e.g. to set PRAGMAs).
  46. database_opts:
  47. min_size: 1
  48. max_size: 10
  49. # Public part of web server for out-of-Matrix interaction with the bridge.
  50. # Used for things like login if the user wants to make sure the 2FA password isn't stored in
  51. # the HS database.
  52. public:
  53. # Whether or not the public-facing endpoints should be enabled.
  54. enabled: {{ matrix_mautrix_telegram_appservice_public_enabled|to_json }}
  55. # The prefix to use in the public-facing endpoints.
  56. prefix: {{ matrix_mautrix_telegram_public_endpoint|to_json }}
  57. # The base URL where the public-facing endpoints are available. The prefix is not added
  58. # implicitly.
  59. external: {{ matrix_mautrix_telegram_appservice_public_external|to_json }}
  60. # Provisioning API part of the web server for automated portal creation and fetching information.
  61. # Used by things like Dimension (https://dimension.t2bot.io/).
  62. provisioning:
  63. # Whether or not the provisioning API should be enabled.
  64. enabled: false
  65. # The prefix to use in the provisioning API endpoints.
  66. prefix: /_matrix/provision/v1
  67. # The shared secret to authorize users of the API.
  68. # Set to "generate" to generate and save a new token.
  69. shared_secret: {{ matrix_mautrix_telegram_provisioning_shared_secret | to_json }}
  70. # The unique ID of this appservice.
  71. id: telegram
  72. # Username of the appservice bot.
  73. bot_username: {{ matrix_mautrix_telegram_appservice_bot_username|to_json }}
  74. # Display name and avatar for bot. Set to "remove" to remove display name/avatar, leave empty
  75. # to leave display name/avatar as-is.
  76. bot_displayname: Telegram bridge bot
  77. bot_avatar: mxc://maunium.net/tJCRmUyJDsgRNgqhOgoiHWbX
  78. # Whether or not to receive ephemeral events via appservice transactions.
  79. # Requires MSC2409 support (i.e. Synapse 1.22+).
  80. # You should disable bridge -> sync_with_custom_puppets when this is enabled.
  81. ephemeral_events: true
  82. # Authentication tokens for AS <-> HS communication.
  83. as_token: {{ matrix_mautrix_telegram_appservice_token|to_json }}
  84. hs_token: {{ matrix_mautrix_telegram_homeserver_token|to_json }}
  85. # Prometheus telemetry config. Requires prometheus-client to be installed.
  86. metrics:
  87. enabled: {{ matrix_mautrix_telegram_metrics_enabled | to_json }}
  88. listen_port: 8000
  89. # Manhole config.
  90. manhole:
  91. # Whether or not opening the manhole is allowed.
  92. enabled: false
  93. # The path for the unix socket.
  94. path: /var/tmp/mautrix-telegram.manhole
  95. # The list of UIDs who can be added to the whitelist.
  96. # If empty, any UIDs can be specified in the open-manhole command.
  97. whitelist:
  98. - 0
  99. # Bridge config
  100. bridge:
  101. # Localpart template of MXIDs for Telegram users.
  102. # {userid} is replaced with the user ID of the Telegram user.
  103. # Default: telegram_{userid}
  104. username_template: {{ matrix_mautrix_telegram_username_template|to_json }}
  105. # Localpart template of room aliases for Telegram portal rooms.
  106. # {groupname} is replaced with the name part of the public channel/group invite link ( https://t.me/{} )
  107. # Default: telegram_{groupname}
  108. alias_template: {{ matrix_mautrix_telegram_alias_template|to_json }}
  109. # Displayname template for Telegram users.
  110. # {displayname} is replaced with the display name of the Telegram user.
  111. # Default: {displayname} (Telegram)
  112. displayname_template: {{ matrix_mautrix_telegram_displayname_template|to_json }}
  113. # Set the preferred order of user IDs which to use in the Matrix puppet display name.
  114. # In the (hopefully unlikely) scenario that none of the given keys are found, the numeric user
  115. # ID is used.
  116. #
  117. # If the bridge is working properly, a phone number or an username should always be known, but
  118. # the other one can very well be empty.
  119. #
  120. # Valid keys:
  121. # "full name" (First and/or last name)
  122. # "full name reversed" (Last and/or first name)
  123. # "first name"
  124. # "last name"
  125. # "username"
  126. # "phone number"
  127. displayname_preference:
  128. - full name
  129. - username
  130. - phone number
  131. # Maximum length of displayname
  132. displayname_max_length: 100
  133. # Remove avatars from Telegram ghost users when removed on Telegram. This is disabled by default
  134. # as there's no way to determine whether an avatar is removed or just hidden from some users. If
  135. # you're on a single-user instance, this should be safe to enable.
  136. allow_avatar_remove: false
  137. # Should contact names and profile pictures be allowed?
  138. # This is only safe to enable on single-user instances.
  139. allow_contact_info: false
  140. # Maximum number of members to sync per portal when starting up. Other members will be
  141. # synced when they send messages. The maximum is 10000, after which the Telegram server
  142. # will not send any more members.
  143. # -1 means no limit (which means it's limited to 10000 by the server)
  144. max_initial_member_sync: 100
  145. # Maximum number of participants in chats to bridge. Only applies when the portal is being created.
  146. # If there are more members when trying to create a room, the room creation will be cancelled.
  147. # -1 means no limit (which means all chats can be bridged)
  148. max_member_count: -1
  149. # Whether or not to sync the member list in channels.
  150. # If no channel admins have logged into the bridge, the bridge won't be able to sync the member
  151. # list regardless of this setting.
  152. sync_channel_members: false
  153. # Whether or not to skip deleted members when syncing members.
  154. skip_deleted_members: true
  155. # Whether or not to automatically synchronize contacts and chats of Matrix users logged into
  156. # their Telegram account at startup.
  157. startup_sync: false
  158. # Number of most recently active dialogs to check when syncing chats.
  159. # Set to 0 to remove limit.
  160. sync_update_limit: 0
  161. # Number of most recently active dialogs to create portals for when syncing chats.
  162. # Set to 0 to remove limit.
  163. sync_create_limit: 15
  164. # Should all chats be scheduled to be created later?
  165. # This is best used in combination with MSC2716 infinite backfill.
  166. sync_deferred_create_all: false
  167. # Whether or not to sync and create portals for direct chats at startup.
  168. sync_direct_chats: false
  169. # The maximum number of simultaneous Telegram deletions to handle.
  170. # A large number of simultaneous redactions could put strain on your homeserver.
  171. max_telegram_delete: 10
  172. # Whether or not to automatically sync the Matrix room state (mostly unpuppeted displaynames)
  173. # at startup and when creating a bridge.
  174. sync_matrix_state: true
  175. # Allow logging in within Matrix. If false, users can only log in using login-qr or the
  176. # out-of-Matrix login website (see appservice.public config section)
  177. allow_matrix_login: true
  178. # Whether or not to make portals of publicly joinable channels/supergroups publicly joinable on Matrix.
  179. public_portals: false
  180. # Whether or not to use /sync to get presence, read receipts and typing notifications
  181. # when double puppeting is enabled
  182. sync_with_custom_puppets: false
  183. # Whether or not to update the m.direct account data event when double puppeting is enabled.
  184. # Note that updating the m.direct event is not atomic (except with mautrix-asmux)
  185. # and is therefore prone to race conditions.
  186. sync_direct_chat_list: false
  187. # Servers to always allow double puppeting from
  188. double_puppet_server_map:
  189. "{{ matrix_mautrix_telegram_homeserver_domain }}": {{ matrix_mautrix_telegram_homeserver_address }}
  190. # Allow using double puppeting from any server with a valid client .well-known file.
  191. double_puppet_allow_discovery: false
  192. # Shared secrets for https://github.com/devture/matrix-synapse-shared-secret-auth
  193. #
  194. # If set, custom puppets will be enabled automatically for local users
  195. # instead of users having to find an access token and run `login-matrix`
  196. # manually.
  197. # If using this for other servers than the bridge's server,
  198. # you must also set the URL in the double_puppet_server_map.
  199. login_shared_secret_map: {{ matrix_mautrix_telegram_bridge_login_shared_secret_map|to_json }}
  200. # Set to false to disable link previews in messages sent to Telegram.
  201. telegram_link_preview: true
  202. # Whether or not the !tg join command should do a HTTP request
  203. # to resolve redirects in invite links.
  204. invite_link_resolve: false
  205. # Send captions in the same message as images. This will send data compatible with both MSC2530 and MSC3552.
  206. # This is currently not supported in most clients.
  207. caption_in_message: false
  208. # Maximum size of image in megabytes before sending to Telegram as a document.
  209. image_as_file_size: 10
  210. # Maximum number of pixels in an image before sending to Telegram as a document. Defaults to 4096x4096 = 16777216.
  211. image_as_file_pixels: 16777216
  212. # Enable experimental parallel file transfer, which makes uploads/downloads much faster by
  213. # streaming from/to Matrix and using many connections for Telegram.
  214. # Note that generating HQ thumbnails for videos is not possible with streamed transfers.
  215. # This option uses internal Telethon implementation details and may break with minor updates.
  216. parallel_file_transfer: false
  217. # Whether or not created rooms should have federation enabled.
  218. # If false, created portal rooms will never be federated.
  219. federate_rooms: {{ matrix_mautrix_telegram_federate_rooms|to_json }}
  220. # Should the bridge send all unicode reactions as custom emoji reactions to Telegram?
  221. # By default, the bridge only uses custom emojis for unicode emojis that aren't allowed in reactions.
  222. always_custom_emoji_reaction: false
  223. # Settings for converting animated stickers.
  224. animated_sticker:
  225. # Format to which animated stickers should be converted.
  226. # disable - No conversion, send as-is (gzipped lottie)
  227. # png - converts to non-animated png (fastest),
  228. # gif - converts to animated gif
  229. # webm - converts to webm video, requires ffmpeg executable with vp9 codec and webm container support
  230. # webp - converts to animated webp, requires ffmpeg executable with webp codec/container support
  231. target: gif
  232. # Should video stickers be converted to the specified format as well?
  233. convert_from_webm: false
  234. # Arguments for converter. All converters take width and height.
  235. args:
  236. width: 256
  237. height: 256
  238. fps: 25 # only for webm, webp and gif (2, 5, 10, 20 or 25 recommended)
  239. # Settings for converting animated emoji.
  240. # Same as animated_sticker, but webm is not supported as the target
  241. # (because inline images can only contain images, not videos).
  242. animated_emoji:
  243. target: webp
  244. args:
  245. width: 64
  246. height: 64
  247. fps: 25
  248. # End-to-bridge encryption support options.
  249. #
  250. # See https://docs.mau.fi/bridges/general/end-to-bridge-encryption.html for more info.
  251. encryption:
  252. # Allow encryption, work in group chat rooms with e2ee enabled
  253. allow: {{ matrix_mautrix_telegram_bridge_encryption_allow|to_json }}
  254. # Default to encryption, force-enable encryption in all portals the bridge creates
  255. # This will cause the bridge bot to be in private chats for the encryption to work properly.
  256. default: {{ matrix_mautrix_telegram_bridge_encryption_default|to_json }}
  257. # Whether to use MSC2409/MSC3202 instead of /sync long polling for receiving encryption-related data.
  258. appservice: false
  259. # Whether to use MSC4190 instead of appservice login to create the bridge bot device.
  260. # Requires the homeserver to support MSC4190 and the device masquerading parts of MSC3202.
  261. # Only relevant when using end-to-bridge encryption, required when using encryption with next-gen auth (MSC3861).
  262. # Changing this option requires updating the appservice registration file.
  263. msc4190: {{ matrix_mautrix_telegram_msc4190_enabled | to_json }}
  264. # Require encryption, drop any unencrypted messages.
  265. require: false
  266. # Enable key sharing? If enabled, key requests for rooms where users are in will be fulfilled.
  267. # You must use a client that supports requesting keys from other users to use this feature.
  268. allow_key_sharing: {{ matrix_mautrix_telegram_bridge_encryption_key_sharing_allow|to_json }}
  269. # Options for deleting megolm sessions from the bridge.
  270. delete_keys:
  271. # Beeper-specific: delete outbound sessions when hungryserv confirms
  272. # that the user has uploaded the key to key backup.
  273. delete_outbound_on_ack: false
  274. # Don't store outbound sessions in the inbound table.
  275. dont_store_outbound: false
  276. # Ratchet megolm sessions forward after decrypting messages.
  277. ratchet_on_decrypt: false
  278. # Delete fully used keys (index >= max_messages) after decrypting messages.
  279. delete_fully_used_on_decrypt: false
  280. # Delete previous megolm sessions from same device when receiving a new one.
  281. delete_prev_on_new_session: false
  282. # Delete megolm sessions received from a device when the device is deleted.
  283. delete_on_device_delete: false
  284. # Periodically delete megolm sessions when 2x max_age has passed since receiving the session.
  285. periodically_delete_expired: false
  286. # Delete inbound megolm sessions that don't have the received_at field used for
  287. # automatic ratcheting and expired session deletion. This is meant as a migration
  288. # to delete old keys prior to the bridge update.
  289. delete_outdated_inbound: false
  290. # What level of device verification should be required from users?
  291. #
  292. # Valid levels:
  293. # unverified - Send keys to all device in the room.
  294. # cross-signed-untrusted - Require valid cross-signing, but trust all cross-signing keys.
  295. # cross-signed-tofu - Require valid cross-signing, trust cross-signing keys on first use (and reject changes).
  296. # cross-signed-verified - Require valid cross-signing, plus a valid user signature from the bridge bot.
  297. # Note that creating user signatures from the bridge bot is not currently possible.
  298. # verified - Require manual per-device verification
  299. # (currently only possible by modifying the `trust` column in the `crypto_device` database table).
  300. verification_levels:
  301. # Minimum level for which the bridge should send keys to when bridging messages from Telegram to Matrix.
  302. receive: unverified
  303. # Minimum level that the bridge should accept for incoming Matrix messages.
  304. send: unverified
  305. # Minimum level that the bridge should require for accepting key requests.
  306. share: cross-signed-tofu
  307. # Options for Megolm room key rotation. These options allow you to
  308. # configure the m.room.encryption event content. See:
  309. # https://spec.matrix.org/v1.3/client-server-api/#mroomencryption for
  310. # more information about that event.
  311. rotation:
  312. # Enable custom Megolm room key rotation settings. Note that these
  313. # settings will only apply to rooms created after this option is
  314. # set.
  315. enable_custom: false
  316. # The maximum number of milliseconds a session should be used
  317. # before changing it. The Matrix spec recommends 604800000 (a week)
  318. # as the default.
  319. milliseconds: 604800000
  320. # The maximum number of messages that should be sent with a given a
  321. # session before changing it. The Matrix spec recommends 100 as the
  322. # default.
  323. messages: 100
  324. # Disable rotating keys when a user's devices change?
  325. # You should not enable this option unless you understand all the implications.
  326. disable_device_change_key_rotation: false
  327. # Whether to explicitly set the avatar and room name for private chat portal rooms.
  328. # If set to `default`, this will be enabled in encrypted rooms and disabled in unencrypted rooms.
  329. # If set to `always`, all DM rooms will have explicit names and avatars set.
  330. # If set to `never`, DM rooms will never have names and avatars set.
  331. private_chat_portal_meta: default
  332. # Disable generating reply fallbacks? Some extremely bad clients still rely on them,
  333. # but they're being phased out and will be completely removed in the future.
  334. disable_reply_fallbacks: false
  335. # Should cross-chat replies from Telegram be bridged? Most servers and clients don't support this.
  336. cross_room_replies: false
  337. # Whether or not the bridge should send a read receipt from the bridge bot when a message has
  338. # been sent to Telegram.
  339. delivery_receipts: false
  340. # Whether or not delivery errors should be reported as messages in the Matrix room.
  341. delivery_error_reports: false
  342. # Should errors in incoming message handling send a message to the Matrix room?
  343. incoming_bridge_error_reports: false
  344. # Whether the bridge should send the message status as a custom com.beeper.message_send_status event.
  345. message_status_events: false
  346. # Set this to true to tell the bridge to re-send m.bridge events to all rooms on the next run.
  347. # This field will automatically be changed back to false after it,
  348. # except if the config file is not writable.
  349. resend_bridge_info: false
  350. # When using double puppeting, should muted chats be muted in Matrix?
  351. mute_bridging: false
  352. # When using double puppeting, should pinned chats be moved to a specific tag in Matrix?
  353. # The favorites tag is `m.favourite`.
  354. pinned_tag: null
  355. # Same as above for archived chats, the low priority tag is `m.lowpriority`.
  356. archive_tag: null
  357. # Whether or not mute status and tags should only be bridged when the portal room is created.
  358. tag_only_on_create: true
  359. # Should leaving the room on Matrix make the user leave on Telegram?
  360. bridge_matrix_leave: true
  361. # Should the user be kicked out of all portals when logging out of the bridge?
  362. kick_on_logout: true
  363. # Should the "* user joined Telegram" notice always be marked as read automatically?
  364. always_read_joined_telegram_notice: true
  365. # Should the bridge auto-create a group chat on Telegram when a ghost is invited to a room?
  366. # Requires the user to have sufficient power level and double puppeting enabled.
  367. create_group_on_invite: true
  368. # Settings for backfilling messages from Telegram.
  369. backfill:
  370. # Allow backfilling at all?
  371. enable: true
  372. # Whether or not to enable backfilling in normal groups.
  373. # Normal groups have numerous technical problems in Telegram, and backfilling normal groups
  374. # will likely cause problems if there are multiple Matrix users in the group.
  375. normal_groups: false
  376. # If a backfilled chat is older than this number of hours, mark it as read even if it's unread on Telegram.
  377. # Set to -1 to let any chat be unread.
  378. unread_hours_threshold: 720
  379. # Forward backfilling limits.
  380. #
  381. # Using a negative initial limit is not recommended, as it would try to backfill everything in a single batch.
  382. forward_limits:
  383. # Number of messages to backfill immediately after creating a portal.
  384. initial:
  385. user: 50
  386. normal_group: 100
  387. supergroup: 10
  388. channel: 10
  389. # Number of messages to backfill when syncing chats.
  390. sync:
  391. user: 100
  392. normal_group: 100
  393. supergroup: 100
  394. channel: 100
  395. # Timeout for forward backfills in seconds. If you have a high limit, you'll have to increase this too.
  396. forward_timeout: 900
  397. # Settings for incremental backfill of history. These only apply to Beeper, as upstream abandoned MSC2716.
  398. incremental:
  399. # Maximum number of messages to backfill per batch.
  400. messages_per_batch: 100
  401. # The number of seconds to wait after backfilling the batch of messages.
  402. post_batch_delay: 20
  403. # The maximum number of batches to backfill per portal, split by the chat type.
  404. # If set to -1, all messages in the chat will eventually be backfilled.
  405. max_batches:
  406. # Direct chats
  407. user: -1
  408. # Normal groups. Note that the normal_groups option above must be enabled
  409. # for these to be backfilled.
  410. normal_group: -1
  411. # Supergroups
  412. supergroup: 10
  413. # Broadcast channels
  414. channel: -1
  415. # Overrides for base power levels.
  416. initial_power_level_overrides:
  417. user: {}
  418. group: {}
  419. # Whether to bridge Telegram bot messages as m.notices or m.texts.
  420. bot_messages_as_notices: true
  421. bridge_notices:
  422. # Whether or not Matrix bot messages (type m.notice) should be bridged.
  423. default: false
  424. # List of user IDs for whom the previous flag is flipped.
  425. # e.g. if bridge_notices.default is false, notices from other users will not be bridged, but
  426. # notices from users listed here will be bridged.
  427. exceptions: []
  428. # An array of possible values for the $distinguisher variable in message formats.
  429. # Each user gets one of the values here, based on a hash of their user ID.
  430. # If the array is empty, the $distinguisher variable will also be empty.
  431. relay_user_distinguishers: ["🟦", "🟣", "🟩", "⭕️", "🔶", "⬛️", "🔵", "🟢"]
  432. # The formats to use when sending messages to Telegram via the relay bot.
  433. # Text msgtypes (m.text, m.notice and m.emote) support HTML, media msgtypes don't.
  434. #
  435. # Available variables:
  436. # $sender_displayname - The display name of the sender (e.g. Example User)
  437. # $sender_username - The username (Matrix ID localpart) of the sender (e.g. alice)
  438. # $sender_mxid - The Matrix ID of the sender (e.g. @alice:example.com)
  439. # $distinguisher - A random string from the options in the relay_user_distinguishers array.
  440. # $message - The message content
  441. message_formats:
  442. m.text: "$distinguisher <b>$sender_displayname</b>: $message"
  443. m.notice: "$distinguisher <b>$sender_displayname</b>: $message"
  444. m.emote: "* $distinguisher <b>$sender_displayname</b> $message"
  445. m.file: "$distinguisher <b>$sender_displayname</b> sent a file: $message"
  446. m.image: "$distinguisher <b>$sender_displayname</b> sent an image: $message"
  447. m.audio: "$distinguisher <b>$sender_displayname</b> sent an audio file: $message"
  448. m.video: "$distinguisher <b>$sender_displayname</b> sent a video: $message"
  449. m.location: "$distinguisher <b>$sender_displayname</b> sent a location: $message"
  450. # Telegram doesn't have built-in emotes, this field specifies how m.emote's from authenticated
  451. # users are sent to telegram. All fields in message_formats are supported. Additionally, the
  452. # Telegram user info is available in the following variables:
  453. # $displayname - Telegram displayname
  454. # $username - Telegram username (may not exist)
  455. # $mention - Telegram @username or displayname mention (depending on which exists)
  456. emote_format: "* $mention $formatted_body"
  457. # The formats to use when sending state events to Telegram via the relay bot.
  458. #
  459. # Variables from `message_formats` that have the `sender_` prefix are available without the prefix.
  460. # In name_change events, `$prev_displayname` is the previous displayname.
  461. #
  462. # Set format to an empty string to disable the messages for that event.
  463. state_event_formats:
  464. join: "$distinguisher <b>$displayname</b> joined the room."
  465. leave: "$distinguisher <b>$displayname</b> left the room."
  466. name_change: "$distinguisher <b>$prev_displayname</b> changed their name to $distinguisher <b>$displayname</b>"
  467. # Filter rooms that can/can't be bridged. Can also be managed using the `filter` and
  468. # `filter-mode` management commands.
  469. #
  470. # An empty blacklist will essentially disable the filter.
  471. filter:
  472. # Filter mode to use. Either "blacklist" or "whitelist".
  473. # If the mode is "blacklist", the listed chats will never be bridged.
  474. # If the mode is "whitelist", only the listed chats can be bridged.
  475. mode: {{ matrix_mautrix_telegram_filter_mode | to_json }}
  476. # The list of group/channel IDs to filter.
  477. list: []
  478. # How to handle direct chats:
  479. # If users is "null", direct chats will follow the previous settings.
  480. # If users is "true", direct chats will always be bridged.
  481. # If users is "false", direct chats will never be bridged.
  482. users: true
  483. # The prefix for commands. Only required in non-management rooms.
  484. command_prefix: {{ matrix_mautrix_telegram_command_prefix | to_json }}
  485. # Messages sent upon joining a management room.
  486. # Markdown is supported. The defaults are listed below.
  487. management_room_text:
  488. # Sent when joining a room.
  489. welcome: "Hello, I'm a Telegram bridge bot."
  490. # Sent when joining a management room and the user is already logged in.
  491. welcome_connected: "Use `help` for help."
  492. # Sent when joining a management room and the user is not logged in.
  493. welcome_unconnected: "Use `help` for help or `login` to log in."
  494. # Optional extra text sent when joining a management room.
  495. additional_help: ""
  496. # Send each message separately (for readability in some clients)
  497. management_room_multiple_messages: false
  498. # Permissions for using the bridge.
  499. # Permitted values:
  500. # relaybot - Only use the bridge via the relaybot, no access to commands.
  501. # user - Relaybot level + access to commands to create bridges.
  502. # puppeting - User level + logging in with a Telegram account.
  503. # full - Full access to use the bridge, i.e. previous levels + Matrix login.
  504. # admin - Full access to use the bridge and some extra administration commands.
  505. # Permitted keys:
  506. # * - All Matrix users
  507. # domain - All users on that homeserver
  508. # mxid - Specific user
  509. permissions: {{ matrix_mautrix_telegram_bridge_permissions | to_json }}
  510. # Options related to the message relay Telegram bot.
  511. relaybot:
  512. private_chat:
  513. # List of users to invite to the portal when someone starts a private chat with the bot.
  514. # If empty, private chats with the bot won't create a portal.
  515. invite: []
  516. # Whether or not to bridge state change messages in relaybot private chats.
  517. state_changes: true
  518. # When private_chat_invite is empty, this message is sent to users /starting the
  519. # relaybot. Telegram's "markdown" is supported.
  520. message: This is a Matrix bridge relaybot and does not support direct chats
  521. # List of users to invite to all group chat portals created by the bridge.
  522. group_chat_invite: []
  523. # Whether or not the relaybot should not bridge events in unbridged group chats.
  524. # If false, portals will be created when the relaybot receives messages, just like normal
  525. # users. This behavior is usually not desirable, as it interferes with manually bridging
  526. # the chat to another room.
  527. ignore_unbridged_group_chat: true
  528. # Whether or not to allow creating portals from Telegram.
  529. authless_portals: true
  530. # Whether or not to allow Telegram group admins to use the bot commands.
  531. whitelist_group_admins: true
  532. # Whether or not to ignore incoming events sent by the relay bot.
  533. ignore_own_incoming_events: true
  534. # List of usernames/user IDs who are also allowed to use the bot commands.
  535. whitelist: []
  536. # Telegram config
  537. telegram:
  538. # Get your own API keys at https://my.telegram.org/apps
  539. api_id: {{ matrix_mautrix_telegram_api_id|to_json }}
  540. api_hash: {{ matrix_mautrix_telegram_api_hash|to_json }}
  541. # (Optional) Create your own bot at https://t.me/BotFather
  542. bot_token: {{ matrix_mautrix_telegram_bot_token|to_json }}
  543. # Should the bridge request missed updates from Telegram when restarting?
  544. catch_up: true
  545. # Should incoming updates be handled sequentially to make sure order is preserved on Matrix?
  546. sequential_updates: true
  547. exit_on_update_error: false
  548. # Telethon connection options.
  549. connection:
  550. # The timeout in seconds to be used when connecting.
  551. timeout: 120
  552. # How many times the reconnection should retry, either on the initial connection or when
  553. # Telegram disconnects us. May be set to a negative or null value for infinite retries, but
  554. # this is not recommended, since the program can get stuck in an infinite loop.
  555. retries: 5
  556. # The delay in seconds to sleep between automatic reconnections.
  557. retry_delay: 1
  558. # The threshold below which the library should automatically sleep on flood wait errors
  559. # (inclusive). For instance, if a FloodWaitError for 17s occurs and flood_sleep_threshold
  560. # is 20s, the library will sleep automatically. If the error was for 21s, it would raise
  561. # the error instead. Values larger than a day (86400) will be changed to a day.
  562. flood_sleep_threshold: 60
  563. # How many times a request should be retried. Request are retried when Telegram is having
  564. # internal issues, when there is a FloodWaitError less than flood_sleep_threshold, or when
  565. # there's a migrate error. May take a negative or null value for infinite retries, but this
  566. # is not recommended, since some requests can always trigger a call fail (such as searching
  567. # for messages).
  568. request_retries: 5
  569. # Use IPv6 for Telethon connection
  570. use_ipv6: false
  571. # Device info sent to Telegram.
  572. device_info:
  573. # "auto" = OS name+version.
  574. device_model: auto
  575. # "auto" = Telethon version.
  576. system_version: auto
  577. # "auto" = mautrix-telegram version.
  578. app_version: auto
  579. lang_code: en
  580. system_lang_code: en
  581. # Custom server to connect to.
  582. server:
  583. # Set to true to use these server settings. If false, will automatically
  584. # use production server assigned by Telegram. Set to false in production.
  585. enabled: false
  586. # The DC ID to connect to.
  587. dc: 2
  588. # The IP to connect to.
  589. ip: 149.154.167.40
  590. # The port to connect to. 443 may not work, 80 is better and both are equally secure.
  591. port: 80
  592. # Telethon proxy configuration.
  593. # You must install PySocks from pip for proxies to work.
  594. proxy:
  595. # Allowed types: disabled, socks4, socks5, http
  596. type: disabled
  597. # Proxy IP address and port.
  598. address: 127.0.0.1
  599. port: 1080
  600. # Whether or not to perform DNS resolving remotely.
  601. rdns: true
  602. # Proxy authentication (optional).
  603. username: ""
  604. password: ""
  605. # Python logging configuration.
  606. #
  607. # See section 16.7.2 of the Python documentation for more info:
  608. # https://docs.python.org/3.6/library/logging.config.html#configuration-dictionary-schema
  609. logging:
  610. version: 1
  611. formatters:
  612. precise:
  613. format: "[%(asctime)s] [%(levelname)s@%(name)s] %(message)s"
  614. handlers:
  615. console:
  616. class: logging.StreamHandler
  617. formatter: precise
  618. loggers:
  619. mau:
  620. level: {{ matrix_mautrix_telegram_logging_level|to_json }}
  621. telethon:
  622. level: {{ matrix_mautrix_telegram_logging_level|to_json }}
  623. aiohttp:
  624. level: {{ matrix_mautrix_telegram_logging_level|to_json }}
  625. root:
  626. level: {{ matrix_mautrix_telegram_logging_level|to_json }}
  627. handlers: [console]