Software / code / prosody-modules
Comparison
mod_csi_simple_compat/mod_csi_simple_compat.lua @ 4006:fcea7cf91702
mod_csi_simple_compat: Module for Prosody 0.11 that adds a setting available from Prosody 0.12
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Fri, 01 May 2020 00:54:32 +0200 |
comparison
equal
deleted
inserted
replaced
| 4005:fe6cb37ac180 | 4006:fcea7cf91702 |
|---|---|
| 1 local st = require "util.stanza"; | |
| 2 | |
| 3 local important_payloads = module:get_option_set("csi_important_payloads", { }); | |
| 4 | |
| 5 module:hook("csi-is-stanza-important", function (event) | |
| 6 local stanza = event.stanza; | |
| 7 if st.is_stanza(stanza) then | |
| 8 for important in important_payloads do | |
| 9 if stanza:find(important) then | |
| 10 return true; | |
| 11 end | |
| 12 end | |
| 13 end | |
| 14 end); |