diff options
author | Kim Alvefur <zash@zash.se> | 2018-08-04 03:13:26 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2018-08-04 03:13:26 +0200 |
commit | 260f94ba39b492a9660abd59ebdba0ea57685f0a (patch) | |
tree | 62153fb2393a4e84a430c74e44f525d6766e6ec7 /plugins/mod_pep.lua | |
parent | e876d5fc91501ac093faa181e8c9076ca64f2023 (diff) | |
download | prosody-260f94ba39b492a9660abd59ebdba0ea57685f0a.tar.gz prosody-260f94ba39b492a9660abd59ebdba0ea57685f0a.zip |
mod_pep: Move subscriber check into 'presence' access model callback
Diffstat (limited to 'plugins/mod_pep.lua')
-rw-r--r-- | plugins/mod_pep.lua | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/plugins/mod_pep.lua b/plugins/mod_pep.lua index 3996aa46..eb00aef9 100644 --- a/plugins/mod_pep.lua +++ b/plugins/mod_pep.lua @@ -240,11 +240,17 @@ function get_pep_service(username) get_affiliation = function (jid) if jid_bare(jid) == user_bare then return "owner"; - elseif subscription_presence(username, jid) then - return "subscriber"; end end; + access_models = { + presence = function (jid) + if subscription_presence(username, jid) then + return "subscriber"; + end + end; + }; + normalize_jid = jid_bare; check_node_config = check_node_config; |