# HG changeset patch # User Kim Alvefur # Date 1453206893 -3600 # Node ID d44ac0756c461c29a756d5c7c47fe2c430ad30be # Parent 279885fd972815d6cfdd94b1dd795e05e79a74c5 mod_mam: Enable archiving by default, less of a privacy issue if messages expire diff -r 279885fd9728 -r d44ac0756c46 mod_mam/README.markdown --- a/mod_mam/README.markdown Tue Jan 19 13:34:16 2016 +0100 +++ b/mod_mam/README.markdown Tue Jan 19 13:34:53 2016 +0100 @@ -39,7 +39,7 @@ option type default ------------------------------ ----------------------- --------- max\_archive\_query\_results number `50` - default\_archive\_policy boolean or `"roster"` `false` + default\_archive\_policy boolean or `"roster"` `true` archive\_expires\_after string `"1w"` Storage backend @@ -97,12 +97,10 @@ The MAM protocol includes a way for clients to control what messages should be stored. This allows users to enable or disable archiving by -default or for specific contacts. This module will log no messages by -default, for privacy concerns. If you decide to change this, you should -inform your users. +default or for specific contacts. ``` {.lua} -default_archive_policy = false +default_archive_policy = true ``` `default_archive_policy =` Meaning diff -r 279885fd9728 -r d44ac0756c46 mod_mam/mamprefs.lib.lua --- a/mod_mam/mamprefs.lib.lua Tue Jan 19 13:34:16 2016 +0100 +++ b/mod_mam/mamprefs.lib.lua Tue Jan 19 13:34:53 2016 +0100 @@ -3,7 +3,7 @@ -- -- This file is MIT/X11 licensed. -local global_default_policy = module:get_option("default_archive_policy", false); +local global_default_policy = module:get_option("default_archive_policy", true); do local prefs_format = { diff -r 279885fd9728 -r d44ac0756c46 mod_mam/mod_mam.lua --- a/mod_mam/mod_mam.lua Tue Jan 19 13:34:16 2016 +0100 +++ b/mod_mam/mod_mam.lua Tue Jan 19 13:34:53 2016 +0100 @@ -30,7 +30,7 @@ local m_min = math.min; local timestamp, timestamp_parse = require "util.datetime".datetime, require "util.datetime".parse; local default_max_items, max_max_items = 20, module:get_option_number("max_archive_query_results", 50); -local global_default_policy = module:get_option("default_archive_policy", false); +local global_default_policy = module:get_option("default_archive_policy", true); if global_default_policy ~= "roster" then global_default_policy = module:get_option_boolean("default_archive_policy", global_default_policy); end