diff options
author | Kim Alvefur <zash@zash.se> | 2018-11-17 15:48:32 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2018-11-17 15:48:32 +0100 |
commit | 5a4eaa0af27be5d07436fda04b5b4e519990b2cd (patch) | |
tree | b7dd1f7b94bc4a621e3f8785701731acdf5aa017 /plugins | |
parent | 7852a9791676ab5d32d40b32abc710f3a7bbab17 (diff) | |
parent | 3d3e0fa0826c0d107a7b99d875190ba4421f668a (diff) | |
download | prosody-5a4eaa0af27be5d07436fda04b5b4e519990b2cd.tar.gz prosody-5a4eaa0af27be5d07436fda04b5b4e519990b2cd.zip |
Merge 0.11->trunk
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/mod_csi_simple.lua | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/plugins/mod_csi_simple.lua b/plugins/mod_csi_simple.lua index 1535edae..c8151df5 100644 --- a/plugins/mod_csi_simple.lua +++ b/plugins/mod_csi_simple.lua @@ -48,6 +48,9 @@ local queue_size = module:get_option_number("csi_queue_size", 256); module:hook("csi-is-stanza-important", function (event) local stanza = event.stanza; + if not st.is_stanza(stanza) then + return true; + end local st_name = stanza.name; if not st_name then return false; end local st_type = stanza.attr.type; @@ -82,8 +85,10 @@ module:hook("csi-client-inactive", function (event) pump:flush(); send(stanza); else - stanza = st.clone(stanza); - stanza:add_direct_child(st.stanza("delay", {xmlns = "urn:xmpp:delay", from = bare_jid, stamp = dt.datetime()})); + if st.is_stanza(stanza) then + stanza = st.clone(stanza); + stanza:add_direct_child(st.stanza("delay", {xmlns = "urn:xmpp:delay", from = bare_jid, stamp = dt.datetime()})); + end pump:push(stanza); end return true; |