diff --git a/conf/config.yaml b/conf/config.yaml index b8ce7c8..c0fcc87 100644 --- a/conf/config.yaml +++ b/conf/config.yaml @@ -167,7 +167,10 @@ bridge: sync_update_limit: 0 # Number of most recently active dialogs to create portals for when syncing chats. # Set to 0 to remove limit. - sync_create_limit: 30 + sync_create_limit: 15 + # Should all chats be scheduled to be created later? + # This is best used in combination with MSC2716 infinite backfill. + sync_deferred_create_all: false # Whether or not to sync and create portals for direct chats at startup. sync_direct_chats: false # The maximum number of simultaneous Telegram deletions to handle. @@ -222,6 +225,9 @@ bridge: # Whether or not created rooms should have federation enabled. # If false, created portal rooms will never be federated. federate_rooms: true + # Should the bridge send all unicode reactions as custom emoji reactions to Telegram? + # By default, the bridge only uses custom emojis for unicode emojis that aren't allowed in reactions. + always_custom_emoji_reaction: false # Settings for converting animated stickers. animated_sticker: # Format to which animated stickers should be converted. @@ -332,34 +338,60 @@ bridge: create_group_on_invite: true # Settings for backfilling messages from Telegram. backfill: - # Whether or not the Telegram ghosts of logged in Matrix users should be - # invited to private chats when backfilling history from Telegram. This is - # usually needed to prevent rate limits and to allow timestamp massaging. - invite_own_puppet: true - # Maximum number of messages to backfill without using a takeout. - # The first time a takeout is used, the user has to manually approve it from a different - # device. If initial_limit or missed_limit are higher than this value, the bridge will ask - # the user to accept the takeout after logging in before syncing any chats. - takeout_limit: 100 - # Maximum number of messages to backfill initially. - # Set to 0 to disable backfilling when creating portal, or -1 to disable the limit. + # Allow backfilling at all? + enable: true + # Use MSC2716 for backfilling? # - # N.B. Initial backfill will only start after member sync. Make sure your - # max_initial_member_sync is set to a low enough value so it doesn't take forever. - initial_limit: 0 - # Maximum number of messages to backfill if messages were missed while the bridge was - # disconnected. Note that this only works for logged in users and only if the chat isn't - # older than sync_update_limit - # Set to 0 to disable backfilling missed messages. - missed_limit: 50 - # If using double puppeting, should notifications be disabled - # while the initial backfill is in progress? - disable_notifications: false + # This requires a server with MSC2716 support, which is currently an experimental feature in Synapse. + # It can be enabled by setting experimental_features -> msc2716_enabled to true in homeserver.yaml. + msc2716: false + # Use double puppets for backfilling? + # + # If using MSC2716, the double puppets must be in the appservice's user ID namespace + # (because the bridge can't use the double puppet access token with batch sending). + # + # Even without MSC2716, bridging old messages with correct timestamps requires the double + # puppets to be in an appservice namespace, or the server to be modified to allow + # overriding timestamps anyway. + double_puppet_backfill: false # Whether or not to enable backfilling in normal groups. # Normal groups have numerous technical problems in Telegram, and backfilling normal groups # will likely cause problems if there are multiple Matrix users in the group. normal_groups: false + # If a backfilled chat is older than this number of hours, mark it as read even if it's unread on Telegram. + # Set to -1 to let any chat be unread. + unread_hours_threshold: 720 + + # Forward backfilling limits. These apply to both MSC2716 and legacy backfill. + # + # Using a negative initial limit is not recommended, as it would try to backfill everything in a single batch. + # MSC2716 and the incremental settings are meant for backfilling everything incrementally rather than at once. + forward: + # Number of messages to backfill immediately after creating a portal. + initial_limit: 10 + # Number of messages to backfill when syncing chats. + sync_limit: 100 + + # Settings for incremental backfill of history. These only apply when using MSC2716. + incremental: + # Maximum number of messages to backfill per batch. + messages_per_batch: 100 + # The number of seconds to wait after backfilling the batch of messages. + post_batch_delay: 20 + # The maximum number of batches to backfill per portal, split by the chat type. + # If set to -1, all messages in the chat will eventually be backfilled. + max_batches: + # Direct chats + user: -1 + # Normal groups. Note that the normal_groups option above must be enabled + # for these to be backfilled. + normal_group: -1 + # Supergroups + supergroup: 10 + # Broadcast channels + channel: -1 + # Overrides for base power levels. initial_power_level_overrides: user: {}