# HG changeset patch # User Kim Alvefur # Date 1540920054 -3600 # Node ID 17d43543f9b60c3323e80329e6a53b13fbbe1c46 # Parent 69e1838a01c60084b29300fbe33710fd7a6e0b19 pubsub: Set pubsub#title as name attribute in disco#items (fixes #1226) diff -r 69e1838a01c6 -r 17d43543f9b6 plugins/mod_pep.lua --- a/plugins/mod_pep.lua Tue Oct 30 12:24:48 2018 +0000 +++ b/plugins/mod_pep.lua Tue Oct 30 18:20:54 2018 +0100 @@ -464,6 +464,6 @@ if not ok then return; end for node, node_obj in pairs(ret) do - reply:tag("item", { jid = user_bare, node = node, name = node_obj.config.name }):up(); + reply:tag("item", { jid = user_bare, node = node, name = node_obj.config.title }):up(); end end); diff -r 69e1838a01c6 -r 17d43543f9b6 plugins/mod_pubsub/mod_pubsub.lua --- a/plugins/mod_pubsub/mod_pubsub.lua Tue Oct 30 12:24:48 2018 +0000 +++ b/plugins/mod_pubsub/mod_pubsub.lua Tue Oct 30 18:20:54 2018 +0100 @@ -152,7 +152,7 @@ return; end for node, node_obj in pairs(ret) do - reply:tag("item", { jid = module.host, node = node, name = node_obj.config.name }):up(); + reply:tag("item", { jid = module.host, node = node, name = node_obj.config.title }):up(); end end); diff -r 69e1838a01c6 -r 17d43543f9b6 spec/scansion/pubsub_config.scs --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/spec/scansion/pubsub_config.scs Tue Oct 30 18:20:54 2018 +0100 @@ -0,0 +1,205 @@ +# pubsub#title as name attribute in disco#items +# Issue 1226 + +[Client] Romeo + password: password + jid: jqpcrbq@localhost + +----- + +Romeo connects + +Romeo sends: + + + + + + + + + + +Romeo receives: + + + + + + + + +Romeo sends: + + + + + + +Romeo receives: + + + + + + http://jabber.org/protocol/pubsub#node_config + + + + + + + 1 + + + 1 + + + + + + + + presence + + + + + + publishers + + + 1 + + + 1 + + + + + headline + + + 1 + + + 1 + + + + + + +Romeo sends: + + + + + + http://jabber.org/protocol/pubsub#node_config + + + Nice tunes + + + + + + 1 + + + 1 + + + + + + + + presence + + + + + + publishers + + + 1 + + + 1 + + + + + headline + + + 1 + + + 1 + + + + + + +Romeo receives: + + +Romeo sends: + + + + +Romeo receives: + + + + + + +Romeo disconnects +