aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/mod_pep.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/mod_pep.lua b/plugins/mod_pep.lua
index 78098423..4a8300f1 100644
--- a/plugins/mod_pep.lua
+++ b/plugins/mod_pep.lua
@@ -33,8 +33,10 @@ local function publish(session, node, item)
-- store for the future
local user_data = data[bare];
if disable then
- if user_data then user_data[node] = nil; end
- if not next(user_data) then data[bare] = nil; end
+ if user_data then
+ user_data[node] = nil;
+ if not next(user_data) then data[bare] = nil; end
+ end
else
if not user_data then user_data = {}; data[bare] = user_data; end
user_data[node] = stanza;