diff options
author | Kim Alvefur <zash@zash.se> | 2018-08-05 01:57:02 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2018-08-05 01:57:02 +0200 |
commit | 86f786bae51f938cd7c224e87f48f97ee1fb02ce (patch) | |
tree | 3703cf19345e5bb6a2c2521e53246c0debf8427f /plugins | |
parent | b57ae7dc187bb7cd296d20e41f6f1535a03276b9 (diff) | |
download | prosody-86f786bae51f938cd7c224e87f48f97ee1fb02ce.tar.gz prosody-86f786bae51f938cd7c224e87f48f97ee1fb02ce.zip |
mod_pep: Save non-presence based subscriptions to storage
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/mod_pep.lua | 9 |
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); |