Changeset

2014:dfa9c0cdd960

mod_mam: Remove application of defaults from preference xml encoding
author Kim Alvefur <zash@zash.se>
date Tue, 19 Jan 2016 13:17:52 +0100
parents 2013:a8ec8491fdee
children 2015:7f90692bbd23
files mod_mam/mamprefsxml.lib.lua
diffstat 1 files changed, 1 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mod_mam/mamprefsxml.lib.lua	Mon Jan 18 12:03:17 2016 +0100
+++ b/mod_mam/mamprefsxml.lib.lua	Tue Jan 19 13:17:52 2016 +0100
@@ -6,8 +6,6 @@
 local st = require"util.stanza";
 local xmlns_mam = "urn:xmpp:mam:0";
 
-local global_default_policy = module:get_option("default_archive_policy", false);
-
 local default_attrs = {
 	always = true, [true] = "always",
 	never = false, [false] = "never",
@@ -16,7 +14,7 @@
 
 local function tostanza(prefs)
 	local default = prefs[false];
-	default = default ~= nil and default_attrs[default] or global_default_policy;
+	default = default_attrs[default];
 	local prefstanza = st.stanza("prefs", { xmlns = xmlns_mam, default = default });
 	local always = st.stanza("always");
 	local never = st.stanza("never");