Software /
code /
prosody
Comparison
plugins/mod_mam/mod_mam.lua @ 7979:a1e88642411d
mod_mam: Handle default_archive_policy option consistently
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 16 Mar 2017 21:01:45 +0100 |
parent | 7908:dbdaa8487ecd |
child | 8000:42dd766cfe97 |
comparison
equal
deleted
inserted
replaced
7978:01aa6344a556 | 7979:a1e88642411d |
---|---|
33 local tostring = tostring; | 33 local tostring = tostring; |
34 local time_now = os.time; | 34 local time_now = os.time; |
35 local m_min = math.min; | 35 local m_min = math.min; |
36 local timestamp, timestamp_parse = require "util.datetime".datetime, require "util.datetime".parse; | 36 local timestamp, timestamp_parse = require "util.datetime".datetime, require "util.datetime".parse; |
37 local default_max_items, max_max_items = 20, module:get_option_number("max_archive_query_results", 50); | 37 local default_max_items, max_max_items = 20, module:get_option_number("max_archive_query_results", 50); |
38 local global_default_policy = module:get_option("default_archive_policy", true); | 38 local global_default_policy = module:get_option_string("default_archive_policy", true); |
39 if global_default_policy ~= "roster" then | 39 if global_default_policy ~= "roster" then |
40 global_default_policy = module:get_option_boolean("default_archive_policy", global_default_policy); | 40 global_default_policy = module:get_option_boolean("default_archive_policy", global_default_policy); |
41 end | 41 end |
42 local strip_tags = module:get_option_set("dont_archive_namespaces", { "http://jabber.org/protocol/chatstates" }); | 42 local strip_tags = module:get_option_set("dont_archive_namespaces", { "http://jabber.org/protocol/chatstates" }); |
43 | 43 |