# HG changeset patch # User Kim Alvefur # Date 1508210563 -7200 # Node ID 8d5c2eef1654e85eb0dbd8adcd66cee0130c712c # Parent 83bab3c8467103e6cf121fe4221aeb4714474f10 mod_pep: Advertise pubsub features that I believe to be implented diff -r 83bab3c84671 -r 8d5c2eef1654 plugins/mod_pep.lua --- a/plugins/mod_pep.lua Tue Oct 17 05:20:11 2017 +0200 +++ b/plugins/mod_pep.lua Tue Oct 17 05:22:43 2017 +0200 @@ -18,6 +18,8 @@ local core_post_stanza = prosody.core_post_stanza; local bare_sessions = prosody.bare_sessions; +local xmlns_pubsub = "http://jabber.org/protocol/pubsub"; + -- Used as canonical 'empty table' local NULL = {}; -- data[user_bare_jid][node] = item_stanza @@ -281,7 +283,23 @@ module:hook("account-disco-info", function(event) local reply = event.reply; reply:tag('identity', {category='pubsub', type='pep'}):up(); - reply:tag('feature', {var='http://jabber.org/protocol/pubsub#publish'}):up(); + reply:tag('feature', {var=xmlns_pubsub}):up(); + local features = { + "access-presence", + "auto-create", + "auto-subscribe", + "filtered-notifications", + "item-ids", + "last-published", + "presence-notifications", + "presence-subscribe", + "publish", + "retract-items", + "retrieve-items", + }; + for _, feature in ipairs(features) do + reply:tag('feature', {var=xmlns_pubsub.."#"..feature}):up(); + end end); module:hook("account-disco-items", function(event)