aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2018-11-27 21:18:19 +0100
committerKim Alvefur <zash@zash.se>2018-11-27 21:18:19 +0100
commitb6b61e70b151f71c3c0a3e30d67efb9a1110eab1 (patch)
treefcb1579e9e63fb308ae73646cc06591a08d3f991
parentc309d32629c0b0f103f32dda5506528e2e1f468b (diff)
parent3d30bbe912591f39288e384e446e82c6f409ba48 (diff)
downloadprosody-b6b61e70b151f71c3c0a3e30d67efb9a1110eab1.tar.gz
prosody-b6b61e70b151f71c3c0a3e30d67efb9a1110eab1.zip
Merge 0.11->trunk
-rw-r--r--plugins/mod_csi.lua1
-rw-r--r--plugins/mod_csi_simple.lua4
2 files changed, 3 insertions, 2 deletions
diff --git a/plugins/mod_csi.lua b/plugins/mod_csi.lua
index 03f052b7..7f50dfd9 100644
--- a/plugins/mod_csi.lua
+++ b/plugins/mod_csi.lua
@@ -11,6 +11,7 @@ end);
function refire_event(name)
return function (event)
if event.origin.username then
+ session.state = event.stanza.name;
module:fire_event(name, event);
return true;
end
diff --git a/plugins/mod_csi_simple.lua b/plugins/mod_csi_simple.lua
index f3df5734..1efff38f 100644
--- a/plugins/mod_csi_simple.lua
+++ b/plugins/mod_csi_simple.lua
@@ -81,11 +81,11 @@ module:hook("csi-client-inactive", function (event)
pump:pause();
session.pump = pump;
function session.send(stanza)
- if module:fire_event("csi-is-stanza-important", { stanza = stanza, session = session }) then
+ if session.state == "active" or module:fire_event("csi-is-stanza-important", { stanza = stanza, session = session }) then
pump:flush();
send(stanza);
else
- if st.is_stanza(stanza) then
+ if st.is_stanza(stanza) and stanza.attr.xmlns == nil and stanza.name ~= "iq" then
stanza = st.clone(stanza);
stanza:add_direct_child(st.stanza("delay", {xmlns = "urn:xmpp:delay", from = bare_jid, stamp = dt.datetime()}));
end