Software /
code /
prosody
Comparison
plugins/mod_mam/mod_mam.lua @ 7904:c011cecad576
mod_mam: Add missing wrapping <query> element when returning the query form
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 20 Feb 2017 00:37:46 +0100 |
parent | 7903:036c771b842a |
child | 7905:daf83bd94906 |
comparison
equal
deleted
inserted
replaced
7903:036c771b842a | 7904:c011cecad576 |
---|---|
87 }; | 87 }; |
88 | 88 |
89 -- Serve form | 89 -- Serve form |
90 module:hook("iq-get/self/"..xmlns_mam..":query", function(event) | 90 module:hook("iq-get/self/"..xmlns_mam..":query", function(event) |
91 local origin, stanza = event.origin, event.stanza; | 91 local origin, stanza = event.origin, event.stanza; |
92 origin.send(st.reply(stanza):add_child(query_form:form())); | 92 origin.send(st.reply(stanza):query(xmlns_mam):add_child(query_form:form())); |
93 return true; | 93 return true; |
94 end); | 94 end); |
95 | 95 |
96 -- Handle archive queries | 96 -- Handle archive queries |
97 module:hook("iq-set/self/"..xmlns_mam..":query", function(event) | 97 module:hook("iq-set/self/"..xmlns_mam..":query", function(event) |