Mercurial > prosody-modules
comparison mod_mam/mod_mam.lua @ 2505:1398f3f76c0f
mod_mam: Add missing wrapping <query> element when returning the query form
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 20 Feb 2017 00:44:27 +0100 |
parents | 144b74caa5ef |
children | 5941aac79f06 |
comparison
equal
deleted
inserted
replaced
2504:d407397d05ca | 2505:1398f3f76c0f |
---|---|
82 }; | 82 }; |
83 | 83 |
84 -- Serve form | 84 -- Serve form |
85 module:hook("iq-get/self/"..xmlns_mam..":query", function(event) | 85 module:hook("iq-get/self/"..xmlns_mam..":query", function(event) |
86 local origin, stanza = event.origin, event.stanza; | 86 local origin, stanza = event.origin, event.stanza; |
87 origin.send(st.reply(stanza):add_child(query_form:form())); | 87 origin.send(st.reply(stanza):query(xmlns_mam):add_child(query_form:form())); |
88 return true; | 88 return true; |
89 end); | 89 end); |
90 | 90 |
91 -- Handle archive queries | 91 -- Handle archive queries |
92 module:hook("iq-set/self/"..xmlns_mam..":query", function(event) | 92 module:hook("iq-set/self/"..xmlns_mam..":query", function(event) |