From 758e535f57eb68f5e65d1c3b6ab85767d6b47057 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sun, 27 Nov 2022 06:11:04 +0000 Subject: [PATCH 1/3] Upgrade to v0.12.2 --- conf/app.src | 4 ++-- manifest.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/conf/app.src b/conf/app.src index fba02b4..208ebbc 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/mautrix/telegram/archive/refs/tags/v0.12.1.tar.gz -SOURCE_SUM=c149a83551247577c2c8c933be8a5ff7593335c64d4e3a577fc8c7d41f0a0999 +SOURCE_URL=https://github.com/mautrix/telegram/archive/refs/tags/v0.12.2.tar.gz +SOURCE_SUM=a25e298db1d0de7113eb6f047e2862fc737c5ee8545473cb7e4fe8b8260eaab9 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index 8707770..0158a5c 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Telegram puppeting bridge for Matrix/Synapse", "fr": "Passerelle Telegram pour Matrix/Synapse" }, - "version": "0.12.1~ynh1", + "version": "0.12.2~ynh1", "url": "https://docs.mau.fi/bridges/python/telegram/index.html", "upstream": { "license": "AGPL-3.0-or-later", From c90820464ba818b9e1f1624a64cddaad8e1bf608 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sun, 27 Nov 2022 06:11:10 +0000 Subject: [PATCH 2/3] Auto-update README --- README.md | 3 +-- README_fr.md | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 221780e..efd762a 100644 --- a/README.md +++ b/README.md @@ -18,8 +18,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in A puppeting bridge between Matrix and Telegram packaged as a YunoHost service. Messages, notifications (and sometimes media) are bridged between a Telegram user and a Matrix user. Currently the Matrix user can NOT invite other Matrix user in a bridged Telegram room, so only someone with a Telegram account can participate to Telegram group conversations. The ["Mautrix-Telegram"](https://docs.mau.fi/bridges/python/telegram/index.html) bridge is a Synapse App Service and relies on postgresql. Therefore, [Synapse for YunoHost](https://github.com/YunoHost-Apps/synapse_ynh) should be installed beforehand. -**Shipped version:** 0.12.1~ynh1 - +**Shipped version:** 0.12.2~ynh1 ## Disclaimers / important information ## List of known public services diff --git a/README_fr.md b/README_fr.md index f98b9fb..793197e 100644 --- a/README_fr.md +++ b/README_fr.md @@ -21,8 +21,7 @@ La passerelle ["Mautrix-Telegram"](https://docs.mau.fi/bridges/python/telegram/i ** Attention : sauvegardez et restaurez toujours les deux applications Yunohost matrix-synapse et mautrix_telegram en même temps!** -**Version incluse :** 0.12.1~ynh1 - +**Version incluse :** 0.12.2~ynh1 ## Avertissements / informations importantes ## Liste de passerelles publiques From 7151a3c801f19a380e1f9aa7905b639213aaa875 Mon Sep 17 00:00:00 2001 From: Dante Date: Sun, 27 Nov 2022 11:26:25 +0000 Subject: [PATCH 3/3] Add config.yaml changes --- conf/config.yaml | 78 ++++++++++++++++++++++++++++++++++-------------- 1 file changed, 55 insertions(+), 23 deletions(-) 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: {}