Changeset

10831:7dd7cdb43181

mod_csi_simple: Identify raw string data in logging and stats
author Kim Alvefur <zash@zash.se>
date Sun, 10 May 2020 23:06:21 +0200
parents 10830:8889d5037aca
children 10832:7395f6e68dba
files plugins/mod_csi_simple.lua
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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