# HG changeset patch # User Kim Alvefur # Date 1533345206 -7200 # Node ID 974b25c27f24b7c3af3ce08d4ea2c7f5a48eb975 # Parent d5bc306e93aa39de7551b7ca29aa022f4e2f5c7d mod_pep: Move subscriber check into 'presence' access model callback diff -r d5bc306e93aa -r 974b25c27f24 plugins/mod_pep.lua --- a/plugins/mod_pep.lua Sat Aug 04 03:04:00 2018 +0200 +++ b/plugins/mod_pep.lua Sat Aug 04 03:13:26 2018 +0200 @@ -240,11 +240,17 @@ 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;