diff mod_mam/mamprefsxml.lib.lua @ 2506:5941aac79f06

mod_mam: Add support for XEP-0313 v0.5
author Kim Alvefur <zash@zash.se>
date Mon, 20 Feb 2017 00:41:13 +0100
parents dfa9c0cdd960
children
line wrap: on
line diff
--- a/mod_mam/mamprefsxml.lib.lua	Mon Feb 20 00:44:27 2017 +0100
+++ b/mod_mam/mamprefsxml.lib.lua	Mon Feb 20 00:41:13 2017 +0100
@@ -4,7 +4,6 @@
 -- This file is MIT/X11 licensed.
 
 local st = require"util.stanza";
-local xmlns_mam = "urn:xmpp:mam:0";
 
 local default_attrs = {
 	always = true, [true] = "always",
@@ -12,7 +11,7 @@
 	roster = "roster",
 }
 
-local function tostanza(prefs)
+local function tostanza(prefs, xmlns_mam)
 	local default = prefs[false];
 	default = default_attrs[default];
 	local prefstanza = st.stanza("prefs", { xmlns = xmlns_mam, default = default });