aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2017-10-17 05:30:09 +0200
committerKim Alvefur <zash@zash.se>2017-10-17 05:30:09 +0200
commita416b20494d239078401db223998549d287d131a (patch)
tree905d84e4ebf7a6ee51c78df1fdf12e332017a69d
parent9f06572f33343c390ca9235bc4af9420d606eb53 (diff)
downloadprosody-a416b20494d239078401db223998549d287d131a.tar.gz
prosody-a416b20494d239078401db223998549d287d131a.zip
mod_pep_plus: Advertise additional features not covered by inspection of pubsub service methods
-rw-r--r--plugins/mod_pep_plus.lua15
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)