comparison mod_csi_pump/mod_csi_pump.lua @ 2710:956b75b0e9d9

mod_csi_pump: Consider presence other than presence updates important (ie subscription requests)
author Kim Alvefur <zash@zash.se>
date Thu, 27 Apr 2017 19:55:18 +0200
parents 3ed504b944e5
children
comparison
equal deleted inserted replaced
2709:2e61642d2ff0 2710:956b75b0e9d9
46 local st_name = stanza.name; 46 local st_name = stanza.name;
47 if not st_name then return false; end 47 if not st_name then return false; end
48 local st_type = stanza.attr.type; 48 local st_type = stanza.attr.type;
49 if st_name == "presence" then 49 if st_name == "presence" then
50 -- TODO check for MUC status codes? 50 -- TODO check for MUC status codes?
51 return false; 51 if st_type == nil or st_type == "unavailable" then
52 return false;
53 end
54 return true;
52 elseif st_name == "message" then 55 elseif st_name == "message" then
53 if st_type == "headline" then 56 if st_type == "headline" then
54 return false; 57 return false;
55 end 58 end
56 local body = stanza:get_child_text("body"); 59 local body = stanza:get_child_text("body");