From 9b7ab06ef37d1271d76f2ef9cba6b8f72af199ce Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sun, 10 May 2020 23:06:21 +0200 Subject: mod_csi_simple: Identify raw string data in logging and stats --- plugins/mod_csi_simple.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'plugins/mod_csi_simple.lua') diff --git a/plugins/mod_csi_simple.lua b/plugins/mod_csi_simple.lua index 0c428c4a..3f3271f0 100644 --- a/plugins/mod_csi_simple.lua +++ b/plugins/mod_csi_simple.lua @@ -16,8 +16,10 @@ local queue_size = module:get_option_number("csi_queue_size", 256); 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 -- cgit v1.2.3