diff options
author | Kim Alvefur <zash@zash.se> | 2017-10-17 05:30:09 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2017-10-17 05:30:09 +0200 |
commit | 6667da24991cacd4921052982f8ec243ffed6610 (patch) | |
tree | 905d84e4ebf7a6ee51c78df1fdf12e332017a69d /plugins/mod_pep_plus.lua | |
parent | adc0b6ee2482aa7ff34975aca8b91e49d0c61fae (diff) | |
download | prosody-6667da24991cacd4921052982f8ec243ffed6610.tar.gz prosody-6667da24991cacd4921052982f8ec243ffed6610.zip |
mod_pep_plus: Advertise additional features not covered by inspection of pubsub service methods
Diffstat (limited to 'plugins/mod_pep_plus.lua')
-rw-r--r-- | plugins/mod_pep_plus.lua | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/plugins/mod_pep_plus.lua b/plugins/mod_pep_plus.lua index 5cd428e7..00d9ea3f 100644 --- a/plugins/mod_pep_plus.lua +++ b/plugins/mod_pep_plus.lua @@ -420,6 +420,7 @@ module:hook("account-disco-info", function(event) local origin, reply = event.origin, event.reply; reply:tag('identity', {category='pubsub', type='pep'}):up(); + reply:tag('feature', {var=xmlns_pubsub}):up(); local username = jid_split(reply.attr.from) or origin.username; local service = get_pep_service(username); @@ -451,6 +452,20 @@ module:hook("account-disco-info", function(event) reply:tag('feature', {var=xmlns_pubsub.."#"..affiliation.."-affiliation"}):up(); end end + + -- Features not covered by the above + local more_features = { + "access-presence", + "auto-subscribe", + "filtered-notifications", + "last-published", + "persistent-items", + "presence-notifications", + "presence-subscribe", + }; + for _, feature in ipairs(more_features) do + reply:tag('feature', {var=xmlns_pubsub.."#"..feature}):up(); + end end); module:hook("account-disco-items-node", function(event) |