diff options
author | Kim Alvefur <zash@zash.se> | 2017-10-17 05:22:43 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2017-10-17 05:22:43 +0200 |
commit | 8fa4c7b78c50abe90b1e8dbeb1b6016a1b84660f (patch) | |
tree | 6dac87c4767c0807e3bd7d884323fb265e290875 /plugins | |
parent | d0bb8df2d567b895323be28b2c1ac122ea188279 (diff) | |
download | prosody-8fa4c7b78c50abe90b1e8dbeb1b6016a1b84660f.tar.gz prosody-8fa4c7b78c50abe90b1e8dbeb1b6016a1b84660f.zip |
mod_pep: Advertise pubsub features that I believe to be implented
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/mod_pep.lua | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/plugins/mod_pep.lua b/plugins/mod_pep.lua index b8eba29c..be6e3f83 100644 --- a/plugins/mod_pep.lua +++ b/plugins/mod_pep.lua @@ -18,6 +18,8 @@ local calculate_hash = require "util.caps".calculate_hash; 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 @@ end); 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) |