aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_pep.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2018-08-05 01:57:02 +0200
committerKim Alvefur <zash@zash.se>2018-08-05 01:57:02 +0200
commite8a41aaea35c7ddaddc40d0b4295f33fb4c874ce (patch)
tree3703cf19345e5bb6a2c2521e53246c0debf8427f /plugins/mod_pep.lua
parentf182e76b40f3ebbd62bf09f6887b2c5f6974cddf (diff)
downloadprosody-e8a41aaea35c7ddaddc40d0b4295f33fb4c874ce.tar.gz
prosody-e8a41aaea35c7ddaddc40d0b4295f33fb4c874ce.zip
mod_pep: Save non-presence based subscriptions to storage
Diffstat (limited to 'plugins/mod_pep.lua')
-rw-r--r--plugins/mod_pep.lua9
1 files changed, 7 insertions, 2 deletions
diff --git a/plugins/mod_pep.lua b/plugins/mod_pep.lua
index 42a01305..1d81c82f 100644
--- a/plugins/mod_pep.lua
+++ b/plugins/mod_pep.lua
@@ -81,12 +81,17 @@ local function nodestore(username)
function store:set(node, data)
if data then
-- Save the data without subscriptions
- -- TODO Save explicit subscriptions maybe?
+ local subscribers = {};
+ for jid, sub in pairs(data.subscribers) do
+ if type(sub) ~= "table" or not sub.presence then
+ subscribers[jid] = sub;
+ end
+ end
data = {
name = data.name;
config = data.config;
affiliations = data.affiliations;
- subscribers = {};
+ subscribers = subscribers;
};
end
return node_config:set(username, node, data);