Comparison

plugins/mod_csi_simple.lua @ 9650:db6bcafd76c9 0.11

mod_csi_simple: Fix autocompletion mistake
author Kim Alvefur <zash@zash.se>
date Tue, 27 Nov 2018 19:15:33 +0100
parent 9649:a20849226598
child 9651:989cf872d5c0
comparison
equal deleted inserted replaced
9649:a20849226598 9650:db6bcafd76c9
84 function session.send(stanza) 84 function session.send(stanza)
85 if session.state == "active" or module:fire_event("csi-is-stanza-important", { stanza = stanza, session = session }) then 85 if session.state == "active" or module:fire_event("csi-is-stanza-important", { stanza = stanza, session = session }) then
86 pump:flush(); 86 pump:flush();
87 send(stanza); 87 send(stanza);
88 else 88 else
89 if st.is_stanza(stanza) and st.attr.xmlns == nil and st.name ~= "iq" then 89 if st.is_stanza(stanza) and stanza.attr.xmlns == nil and stanza.name ~= "iq" then
90 stanza = st.clone(stanza); 90 stanza = st.clone(stanza);
91 stanza:add_direct_child(st.stanza("delay", {xmlns = "urn:xmpp:delay", from = bare_jid, stamp = dt.datetime()})); 91 stanza:add_direct_child(st.stanza("delay", {xmlns = "urn:xmpp:delay", from = bare_jid, stamp = dt.datetime()}));
92 end 92 end
93 pump:push(stanza); 93 pump:push(stanza);
94 end 94 end