aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_csi_simple.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2020-05-10 23:12:33 +0200
committerKim Alvefur <zash@zash.se>2020-05-10 23:12:33 +0200
commit05e276504d45f73d08da05ef46fd75511a123b42 (patch)
tree333f9381139a91dede0921a3c7e95f88eb05cdf5 /plugins/mod_csi_simple.lua
parentd51e32b8d35443278d56a106e350f6f12458cd1f (diff)
downloadprosody-05e276504d45f73d08da05ef46fd75511a123b42.tar.gz
prosody-05e276504d45f73d08da05ef46fd75511a123b42.zip
mod_csi_simple: Report whatever's not a stirng and not a stanza
This is either dead code or actually a type error, but catching that should be the responsibility of the session.send function. This type check is left since everything after it assumes a stanza object. These last few commits aren't meant to change any behavior and it did mark things not stanzas as important, but those would have been mostly raw strings which are now specially handled.
Diffstat (limited to 'plugins/mod_csi_simple.lua')
-rw-r--r--plugins/mod_csi_simple.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/mod_csi_simple.lua b/plugins/mod_csi_simple.lua
index 679f9b48..d814f083 100644
--- a/plugins/mod_csi_simple.lua
+++ b/plugins/mod_csi_simple.lua
@@ -21,7 +21,8 @@ function is_important(stanza) --> boolean, reason: string
elseif type(stanza) == "string" then
return true, "raw data";
elseif not st.is_stanza(stanza) then
- return true;
+ -- This should probably never happen
+ return true, type(stanza);
end
if stanza.attr.xmlns ~= nil then
-- stream errors, stream management etc