From 50126a53b9fb3069d0877a3b57de420ba3676853 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sat, 4 Aug 2018 03:13:26 +0200 Subject: mod_pep: Move subscriber check into 'presence' access model callback --- plugins/mod_pep.lua | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'plugins/mod_pep.lua') 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; -- cgit v1.2.3