Software /
code /
prosody
Diff
plugins/mod_pep.lua @ 9099:974b25c27f24
mod_pep: Move subscriber check into 'presence' access model callback
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 04 Aug 2018 03:13:26 +0200 |
parent | 9097:ce2ba9f91c84 |
child | 9103:d5a7d2697b19 |
line wrap: on
line diff
--- 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;