aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2014-09-27 19:00:09 +0200
committerKim Alvefur <zash@zash.se>2014-09-27 19:00:09 +0200
commitbc2dc17d56a1a6f35177469c7122dfe577c3bf2c (patch)
tree15b74acd41d81a5c607ff90553019ebfdaef7011 /plugins
parent86f985a23d2405f172614e8f22fdc474ff56e81c (diff)
downloadprosody-bc2dc17d56a1a6f35177469c7122dfe577c3bf2c.tar.gz
prosody-bc2dc17d56a1a6f35177469c7122dfe577c3bf2c.zip
mod_pep_plus: Add pubsub service objects to an item list
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_pep_plus.lua11
1 files changed, 7 insertions, 4 deletions
diff --git a/plugins/mod_pep_plus.lua b/plugins/mod_pep_plus.lua
index 81dd3085..351b0e3c 100644
--- a/plugins/mod_pep_plus.lua
+++ b/plugins/mod_pep_plus.lua
@@ -55,10 +55,11 @@ local function get_broadcaster(name)
end
function get_pep_service(name)
- if services[name] then
- return services[name];
+ local service = services[name];
+ if service then
+ return service;
end
- services[name] = pubsub.new({
+ service = pubsub.new({
capabilities = {
none = {
create = false;
@@ -166,7 +167,9 @@ function get_pep_service(name)
normalize_jid = jid_bare;
});
- return services[name];
+ services[name] = service;
+ module:add_item("pep-service", { service = service, jid = name });
+ return service;
end
function handle_pubsub_iq(event)