Mercurial > prosody-hg
comparison plugins/mod_csi_simple.lua @ 10772:31e702c5f475
mod_csi_simple: Explicitly mention iq stanzas
Should be more obvious that all iq stanzas are considered important.
Changes behavior for invalid things in the default namespace.
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Sun, 26 Apr 2020 11:40:48 +0200 |
| parents | c562edcf51bf |
| children | 2b97aac0ea3c |
comparison
equal
deleted
inserted
replaced
| 10771:c562edcf51bf | 10772:31e702c5f475 |
|---|---|
| 63 if stanza:find(important) then | 63 if stanza:find(important) then |
| 64 return true; | 64 return true; |
| 65 end | 65 end |
| 66 end | 66 end |
| 67 return false; | 67 return false; |
| 68 elseif st_name == "iq" then | |
| 69 return true; | |
| 68 end | 70 end |
| 69 return true; | |
| 70 end, -1); | 71 end, -1); |
| 71 | 72 |
| 72 local function with_timestamp(stanza, from) | 73 local function with_timestamp(stanza, from) |
| 73 if st.is_stanza(stanza) and stanza.attr.xmlns == nil and stanza.name ~= "iq" then | 74 if st.is_stanza(stanza) and stanza.attr.xmlns == nil and stanza.name ~= "iq" then |
| 74 stanza = st.clone(stanza); | 75 stanza = st.clone(stanza); |
