diff options
author | Kim Alvefur <zash@zash.se> | 2014-09-27 19:00:09 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2014-09-27 19:00:09 +0200 |
commit | 865f1b1e8f99ab70c45cb2a4f94df34a2cb190ea (patch) | |
tree | 15b74acd41d81a5c607ff90553019ebfdaef7011 | |
parent | f117cb8cbfe55da0063889edf5a48bf268da3a08 (diff) | |
download | prosody-865f1b1e8f99ab70c45cb2a4f94df34a2cb190ea.tar.gz prosody-865f1b1e8f99ab70c45cb2a4f94df34a2cb190ea.zip |
mod_pep_plus: Add pubsub service objects to an item list
-rw-r--r-- | plugins/mod_pep_plus.lua | 11 |
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) |