Comparison

mod_throttle_presence/mod_throttle_presence.lua @ 1489:95f10fb7f60e

mod_throttle_presence: Use local buffer variable, fixes a traceback (thanks Ge0rG)
author Kim Alvefur <zash@zash.se>
date Sun, 17 Aug 2014 20:53:59 +0200
parent 1488:ba97f9be4f76
child 1504:b8164f18142a
comparison
equal deleted inserted replaced
1488:ba97f9be4f76 1489:95f10fb7f60e
13 session.send(cached_presence); 13 session.send(cached_presence);
14 buffer[stanza.attr.from] = nil; 14 buffer[stanza.attr.from] = nil;
15 end 15 end
16 else 16 else
17 module:log("debug", "Buffering presence stanza from %s to %s", stanza.attr.from, session.full_jid); 17 module:log("debug", "Buffering presence stanza from %s to %s", stanza.attr.from, session.full_jid);
18 session.buffer[stanza.attr.from] = st.clone(stanza); 18 buffer[stanza.attr.from] = st.clone(stanza);
19 return nil; -- Drop this stanza (we've stored it for later) 19 return nil; -- Drop this stanza (we've stored it for later)
20 end 20 end
21 return stanza; 21 return stanza;
22 end 22 end
23 23