Software /
code /
prosody
Changeset
5480:415e520e4a4c
Merge 0.9->trunk
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Wed, 17 Apr 2013 14:20:02 +0100 |
parents | 5478:de19e6005f1a (current diff) 5479:81c599c7588b (diff) |
children | 5483:ed10252ee9c3 |
files | |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_pubsub.lua Mon Apr 15 21:26:20 2013 +0100 +++ b/plugins/mod_pubsub.lua Wed Apr 17 14:20:02 2013 +0100 @@ -190,7 +190,11 @@ return origin.send(pubsub_error_reply(stanza, "nodeid-required")); end local item = publish:get_child("item"); - local id = (item and item.attr.id) or uuid_generate(); + local id = (item and item.attr.id); + if not id then + id = uuid_generate(); + item.attr.id = id; + end local ok, ret = service:publish(node, stanza.attr.from, id, item); local reply; if ok then