Mercurial > prosody-hg
comparison plugins/mod_csi_simple.lua @ 10770:b4cbe72966c9
mod_csi_simple: Consider nonzas important
This case was previously handled by fall-trough at the end of the
function.
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Sun, 26 Apr 2020 11:13:01 +0200 |
| parents | 8cecb85e4bc4 |
| children | c562edcf51bf |
comparison
equal
deleted
inserted
replaced
| 10769:8cecb85e4bc4 | 10770:b4cbe72966c9 |
|---|---|
| 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 module:hook("csi-is-stanza-important", function (event) | 18 module:hook("csi-is-stanza-important", function (event) |
| 19 local stanza = event.stanza; | 19 local stanza = event.stanza; |
| 20 if not st.is_stanza(stanza) then | 20 if not st.is_stanza(stanza) then |
| 21 return true; | |
| 22 end | |
| 23 if stanza.attr.xmlns ~= nil then | |
| 24 -- stream errors, stream management etc | |
| 21 return true; | 25 return true; |
| 22 end | 26 end |
| 23 local st_name = stanza.name; | 27 local st_name = stanza.name; |
| 24 if not st_name then return false; end | 28 if not st_name then return false; end |
| 25 local st_type = stanza.attr.type; | 29 local st_type = stanza.attr.type; |
