Improve Telegram message deduplication

* Add pre-send message database check for deduplication
* Make dedup cache queue length configurable
This commit is contained in:
Tulir Asokan
2018-08-07 23:28:48 +03:00
parent 79cdc2e952
commit ccd2eaec70
3 changed files with 43 additions and 4 deletions
+10
View File
@@ -136,6 +136,16 @@ bridge:
# your own Matrix account as the Matrix puppet for your Telegram account.
sync_with_custom_puppets: true
# Some config options related to Telegram message deduplication.
# The default values are usually fine, but some debug messages/warnings might recommend you
# change these.
deduplication:
# Whether or not to check the database if the message about to be sent is a duplicate.
pre_db_check: false
# The number of latest events to keep when checking for duplicates.
# You might need to increase this on high-traffic bridge instances.
cache_queue_length: 20
# The formats to use when sending messages to Telegram via the relay bot.
#
# Telegram doesn't have built-in emotes, so the m.emote format is also used for non-relaybot users.