aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_pep.lua
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/mod_pep.lua')
-rw-r--r--plugins/mod_pep.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/mod_pep.lua b/plugins/mod_pep.lua
index 0c360b38..5274cf81 100644
--- a/plugins/mod_pep.lua
+++ b/plugins/mod_pep.lua
@@ -11,6 +11,8 @@ local load_roster = require "core.rostermanager".load_roster;
local data = {};
local recipients = {};
+module:add_identity("pubsub", "pep");
+
local function publish(session, node, item)
local stanza = st.message({from=session.full_jid, type='headline'})
:tag('event', {xmlns='http://jabber.org/protocol/pubsub#event'})
@@ -51,7 +53,7 @@ module:hook("presence/bare", function(data)
if t == "unavailable" or t == "error" then
if recipients[user] then recipients[user][recipient] = nil; end
elseif not t then
- recipients[user] = recipients[user][recipient] or {};
+ recipients[user] = recipients[user] or {};
if not recipients[user][recipient] then
recipients[user][recipient] = true;
for node, message in pairs(data[user] or {}) do