Comparison

plugins/mod_csi_simple.lua @ 9644:e31547ab1ca2 0.11

mod_csi_simple: Use the same event name when firing as when hooking (fixes #1245)
author Kim Alvefur <zash@zash.se>
date Sun, 25 Nov 2018 14:47:36 +0100
parent 9632:fdefc43bffff
child 9648:dfebf6cac027
comparison
equal deleted inserted replaced
9640:28d4b9d5a432 9644:e31547ab1ca2
79 session._orig_send = send; 79 session._orig_send = send;
80 local pump = new_pump(session.send, queue_size); 80 local pump = new_pump(session.send, queue_size);
81 pump:pause(); 81 pump:pause();
82 session.pump = pump; 82 session.pump = pump;
83 function session.send(stanza) 83 function session.send(stanza)
84 if module:fire_event("csi-stanza-is-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) then
89 stanza = st.clone(stanza); 89 stanza = st.clone(stanza);