diff options
author | Kim Alvefur <zash@zash.se> | 2021-12-07 13:03:55 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2021-12-07 13:03:55 +0100 |
commit | f2f78d4bf9f5c3af39cc684bff851e49e3ad1d00 (patch) | |
tree | 6e00198c976d11f06fd62b0a7a2ed9022748c769 /plugins/mod_pubsub | |
parent | a3c82c5d0259a5fb53696391f2472c4ba462b8fa (diff) | |
download | prosody-f2f78d4bf9f5c3af39cc684bff851e49e3ad1d00.tar.gz prosody-f2f78d4bf9f5c3af39cc684bff851e49e3ad1d00.zip |
mod_pubsub: Allow specifying the JID of the pubsub service
This allows overriding it in cases where it is not equal to module.host,
like say, in mod_pep
Diffstat (limited to 'plugins/mod_pubsub')
-rw-r--r-- | plugins/mod_pubsub/mod_pubsub.lua | 1 | ||||
-rw-r--r-- | plugins/mod_pubsub/pubsub.lib.lua | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/plugins/mod_pubsub/mod_pubsub.lua b/plugins/mod_pubsub/mod_pubsub.lua index ed895cf4..be460f72 100644 --- a/plugins/mod_pubsub/mod_pubsub.lua +++ b/plugins/mod_pubsub/mod_pubsub.lua @@ -231,6 +231,7 @@ function module.load() check_node_config = check_node_config; get_affiliation = get_affiliation; + jid = module.host; normalize_jid = jid_bare; })); end diff --git a/plugins/mod_pubsub/pubsub.lib.lua b/plugins/mod_pubsub/pubsub.lib.lua index 971a7fd0..83cef808 100644 --- a/plugins/mod_pubsub/pubsub.lib.lua +++ b/plugins/mod_pubsub/pubsub.lib.lua @@ -309,7 +309,7 @@ function _M.handle_disco_items_node(event, service) end for _, id in ipairs(ret) do - reply:tag("item", { jid = module.host, name = id }):up(); + reply:tag("item", { jid = service.jid or module.host, name = id }):up(); end event.exists = true; end |