plugins/mod_csi_simple.lua
changeset 10836 7395f6e68dba
parent 10835 7dd7cdb43181
child 10837 ac691f305ea7
equal deleted inserted replaced
10835:7dd7cdb43181 10836:7395f6e68dba
    14 local queue_size = module:get_option_number("csi_queue_size", 256);
    14 local queue_size = module:get_option_number("csi_queue_size", 256);
    15 
    15 
    16 local important_payloads = module:get_option_set("csi_important_payloads", { });
    16 local important_payloads = module:get_option_set("csi_important_payloads", { });
    17 
    17 
    18 function is_important(stanza) --> boolean, reason: string
    18 function is_important(stanza) --> boolean, reason: string
    19 	if type(stanza) == "string" then
    19 	if stanza == " " then
    20 		-- whitespace pings etc
    20 		return true, "whitespace keepalive";
       
    21 	elseif type(stanza) == "string" then
    21 		return true, "raw data";
    22 		return true, "raw data";
    22 	elseif not st.is_stanza(stanza) then
    23 	elseif not st.is_stanza(stanza) then
    23 		return true;
    24 		return true;
    24 	end
    25 	end
    25 	if stanza.attr.xmlns ~= nil then
    26 	if stanza.attr.xmlns ~= nil then