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 | 50126a53b9fb3069d0877a3b57de420ba3676853 (patch) | |
tree | 62153fb2393a4e84a430c74e44f525d6766e6ec7 /plugins | |
parent | d9abcdd04857614e0462ad781daeea8f15b0cb1b (diff) | |
download | prosody-50126a53b9fb3069d0877a3b57de420ba3676853.tar.gz prosody-50126a53b9fb3069d0877a3b57de420ba3676853.zip |
mod_pep: Move subscriber check into 'presence' access model callback
Diffstat (limited to 'plugins')
-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; |