# HG changeset patch # User Kim Alvefur # Date 1589144781 -7200 # Node ID 7dd7cdb431817a26ab1e7800a8a089efdab86a38 # Parent 8889d5037acac684afb931a8322c5b8eb2e7b61a mod_csi_simple: Identify raw string data in logging and stats diff -r 8889d5037aca -r 7dd7cdb43181 plugins/mod_csi_simple.lua --- a/plugins/mod_csi_simple.lua Sat May 09 17:47:03 2020 +0200 +++ b/plugins/mod_csi_simple.lua Sun May 10 23:06:21 2020 +0200 @@ -16,8 +16,10 @@ local important_payloads = module:get_option_set("csi_important_payloads", { }); function is_important(stanza) --> boolean, reason: string - if not st.is_stanza(stanza) then + if type(stanza) == "string" then -- whitespace pings etc + return true, "raw data"; + elseif not st.is_stanza(stanza) then return true; end if stanza.attr.xmlns ~= nil then