diff options
author | Matthew Wild <mwild1@gmail.com> | 2013-06-13 13:56:58 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2013-06-13 13:56:58 +0100 |
commit | a3e3c7ecc7bccff307dd31a34c2400266782ef31 (patch) | |
tree | 840496b3acda4627207ef0f3878e30faec07986a /plugins | |
parent | f5b07ef8c17c9042c532b5450cbc1301cd31e872 (diff) | |
parent | 7507b21e6afb3d79c1f79e03d7ed168cc4cbaa39 (diff) | |
download | prosody-a3e3c7ecc7bccff307dd31a34c2400266782ef31.tar.gz prosody-a3e3c7ecc7bccff307dd31a34c2400266782ef31.zip |
Merge 0.9->trunk
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/mod_pep.lua | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/mod_pep.lua b/plugins/mod_pep.lua index d59bd2a2..778f83ed 100644 --- a/plugins/mod_pep.lua +++ b/plugins/mod_pep.lua @@ -62,7 +62,7 @@ local function publish(session, node, id, item) end else if not user_data then user_data = {}; data[bare] = user_data; end - user_data[node] = {id or "1", item}; + user_data[node] = {id, item}; end -- broadcast @@ -169,7 +169,8 @@ module:hook("iq/bare/http://jabber.org/protocol/pubsub:pubsub", function(event) local node = payload.attr.node; payload = payload.tags[1]; if payload and payload.name == "item" then -- <item> - local id = payload.attr.id; + local id = payload.attr.id or "1"; + payload.attr.id = id; session.send(st.reply(stanza)); publish(session, node, id, st.clone(payload)); return true; |