diff options
author | Kim Alvefur <zash@zash.se> | 2018-02-24 11:51:43 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2018-02-24 11:51:43 +0100 |
commit | 64b910bfb8d2bca4476d106cf2771daca96fbc47 (patch) | |
tree | 526ebbe170576e4da16af5d57eb49dabbaccaf2b /plugins/mod_mam/mod_mam.lua | |
parent | d673ae8b8a209c48d55bf8101e236adee43ff40b (diff) | |
parent | 599fc103ab554231f71859df3213ef964f519b2e (diff) | |
download | prosody-64b910bfb8d2bca4476d106cf2771daca96fbc47.tar.gz prosody-64b910bfb8d2bca4476d106cf2771daca96fbc47.zip |
Merge 0.10->trunk
Diffstat (limited to 'plugins/mod_mam/mod_mam.lua')
-rw-r--r-- | plugins/mod_mam/mod_mam.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/mod_mam/mod_mam.lua b/plugins/mod_mam/mod_mam.lua index 7499c9ea..353fe1a2 100644 --- a/plugins/mod_mam/mod_mam.lua +++ b/plugins/mod_mam/mod_mam.lua @@ -76,7 +76,7 @@ module:hook("iq/self/"..xmlns_mam..":prefs", function(event) return true; end end - local prefs = prefs_to_stanza(get_prefs(user)); + local prefs = prefs_to_stanza(get_prefs(user, true)); local reply = st.reply(stanza):add_child(prefs); origin.send(reply); return true; @@ -92,6 +92,7 @@ local query_form = dataform { -- Serve form module:hook("iq-get/self/"..xmlns_mam..":query", function(event) local origin, stanza = event.origin, event.stanza; + get_prefs(origin.username, true); origin.send(st.reply(stanza):query(xmlns_mam):add_child(query_form:form())); return true; end); @@ -102,6 +103,7 @@ module:hook("iq-set/self/"..xmlns_mam..":query", function(event) local query = stanza.tags[1]; local qid = query.attr.queryid; + get_prefs(origin.username, true); schedule_cleanup(origin.username); -- Search query parameters |