Software /
code /
prosody-modules
Comparison
mod_mam/mod_mam.lua @ 2017:d44ac0756c46
mod_mam: Enable archiving by default, less of a privacy issue if messages expire
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 19 Jan 2016 13:34:53 +0100 |
parent | 2016:279885fd9728 |
child | 2018:13f46d9e526f |
comparison
equal
deleted
inserted
replaced
2016:279885fd9728 | 2017:d44ac0756c46 |
---|---|
28 local tostring = tostring; | 28 local tostring = tostring; |
29 local time_now = os.time; | 29 local time_now = os.time; |
30 local m_min = math.min; | 30 local m_min = math.min; |
31 local timestamp, timestamp_parse = require "util.datetime".datetime, require "util.datetime".parse; | 31 local timestamp, timestamp_parse = require "util.datetime".datetime, require "util.datetime".parse; |
32 local default_max_items, max_max_items = 20, module:get_option_number("max_archive_query_results", 50); | 32 local default_max_items, max_max_items = 20, module:get_option_number("max_archive_query_results", 50); |
33 local global_default_policy = module:get_option("default_archive_policy", false); | 33 local global_default_policy = module:get_option("default_archive_policy", true); |
34 if global_default_policy ~= "roster" then | 34 if global_default_policy ~= "roster" then |
35 global_default_policy = module:get_option_boolean("default_archive_policy", global_default_policy); | 35 global_default_policy = module:get_option_boolean("default_archive_policy", global_default_policy); |
36 end | 36 end |
37 | 37 |
38 local archive_store = "archive2"; | 38 local archive_store = "archive2"; |