From 6f36d6b507044bdf8376ae1159ab0c86a3cd337a Mon Sep 17 00:00:00 2001 From: mathieui Date: Sun, 11 Apr 2021 13:15:07 +0200 Subject: [PATCH] feature: add a mam_sync option --- data/default_config.cfg | 3 +++ doc/source/configuration.rst | 7 +++++++ poezio/config.py | 1 + 3 files changed, 11 insertions(+) diff --git a/data/default_config.cfg b/data/default_config.cfg index 4405164f..9f284f07 100644 --- a/data/default_config.cfg +++ b/data/default_config.cfg @@ -249,6 +249,9 @@ use_bookmarks_method = # in files. #use_log = true +# set to 'false' to not sync the local lgos with the MAM server history +#mam_sync = true + # The number of lines to preload in a chat buffer when it opens # (the lines are preloaded from the log files) # 0 or a negative value disable that option diff --git a/doc/source/configuration.rst b/doc/source/configuration.rst index 8b364961..f8d04296 100644 --- a/doc/source/configuration.rst +++ b/doc/source/configuration.rst @@ -861,6 +861,13 @@ Options related to logging. Set to ``false`` if you don’t want to write any message to the disk. + mam_sync + + **Default value:** ``true`` + + If ``true``, will try to fill local logs with missing MAM history + when opening a tab or joining a room. + Plugins ~~~~~~~ diff --git a/poezio/config.py b/poezio/config.py index 713eada7..e98a57c1 100644 --- a/poezio/config.py +++ b/poezio/config.py @@ -92,6 +92,7 @@ DEFAULT_CONFIG: ConfigDict = { 'lazy_resize': True, 'log_dir': '', 'log_errors': True, + 'mam_sync': True, 'max_lines_in_memory': 2048, 'max_messages_in_memory': 2048, 'max_nick_length': 25,