From a416b20494d239078401db223998549d287d131a Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Tue, 17 Oct 2017 05:30:09 +0200 Subject: mod_pep_plus: Advertise additional features not covered by inspection of pubsub service methods --- plugins/mod_pep_plus.lua | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'plugins/mod_pep_plus.lua') 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) -- cgit v1.2.3