Software /
code /
prosody
Comparison
plugins/mod_csi_simple.lua @ 9648:dfebf6cac027 0.11
mod_csi_simple: Don't set <delay> stamps on <iq> stanzas (fixes #1248)
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 27 Nov 2018 18:56:22 +0100 |
parent | 9644:e31547ab1ca2 |
child | 9649:a20849226598 |
comparison
equal
deleted
inserted
replaced
9645:cc642c9c5ad5 | 9648:dfebf6cac027 |
---|---|
83 function session.send(stanza) | 83 function session.send(stanza) |
84 if module:fire_event("csi-is-stanza-important", { stanza = stanza, session = session }) then | 84 if module:fire_event("csi-is-stanza-important", { stanza = stanza, session = session }) then |
85 pump:flush(); | 85 pump:flush(); |
86 send(stanza); | 86 send(stanza); |
87 else | 87 else |
88 if st.is_stanza(stanza) then | 88 if st.is_stanza(stanza) and st.attr.xmlns == nil and st.name ~= "iq" then |
89 stanza = st.clone(stanza); | 89 stanza = st.clone(stanza); |
90 stanza:add_direct_child(st.stanza("delay", {xmlns = "urn:xmpp:delay", from = bare_jid, stamp = dt.datetime()})); | 90 stanza:add_direct_child(st.stanza("delay", {xmlns = "urn:xmpp:delay", from = bare_jid, stamp = dt.datetime()})); |
91 end | 91 end |
92 pump:push(stanza); | 92 pump:push(stanza); |
93 end | 93 end |