comparison mod_filter_chatstates/mod_filter_chatstates.lua @ 1829:23b3c8e294d2

mod_filter_chatstates: Hack to make sure session.send does not return nil which may break things sometimes
author Kim Alvefur <zash@zash.se>
date Fri, 04 Sep 2015 00:41:29 +0200
parents ca48eea4785c
children 58d96960ba8b
comparison
equal deleted inserted replaced
1828:318f38d79ea9 1829:23b3c8e294d2
10 if tag.attr.xmlns ~= "http://jabber.org/protocol/chatstates" then 10 if tag.attr.xmlns ~= "http://jabber.org/protocol/chatstates" then
11 return tag 11 return tag
12 end 12 end
13 end); 13 end);
14 if #stanza.tags == 0 then 14 if #stanza.tags == 0 then
15 return nil; 15 return "";
16 end 16 end
17 end 17 end
18 return stanza; 18 return stanza;
19 end 19 end
20 20