Mercurial > prosody-modules
comparison mod_csi_simple_compat/mod_csi_simple_compat.lua @ 4008:ec9011df2dc6
Merge
author | JC Brand <jc@opkode.com> |
---|---|
date | Fri, 01 May 2020 11:34:43 +0200 |
parents | fcea7cf91702 |
children |
comparison
equal
deleted
inserted
replaced
4007:845d13ab0dc0 | 4008:ec9011df2dc6 |
---|---|
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); |