aboutsummaryrefslogtreecommitdiff
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
commit8052c506f5e99bcd1ef0b1d68b6e568e33dbadb9 (patch)
treeb1e5d3114b2e5baadf5db240230ddef8d457feda
parent73d39e5a2dacad014116f20e931776cc9e235240 (diff)
downloadprosody-im-server-8052c506f5e99bcd1ef0b1d68b6e568e33dbadb9.zip
prosody-im-server-8052c506f5e99bcd1ef0b1d68b6e568e33dbadb9.tar
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)