aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_pubsub.lua
diff options
context:
space:
mode:
authorMarco Cirillo <maranda@lightwitch.org>2011-04-06 20:00:44 +0100
committerMarco Cirillo <maranda@lightwitch.org>2011-04-06 20:00:44 +0100
commite279ce521d978ff817bf575d4a2c2d61a534e5de (patch)
treedc60bc1ad4bdd54c8484bd441f8e2179cf67dc82 /plugins/mod_pubsub.lua
parent1de31d1a085ea52a7de917b23b9c28b32747f864 (diff)
downloadprosody-e279ce521d978ff817bf575d4a2c2d61a534e5de.tar.gz
prosody-e279ce521d978ff817bf575d4a2c2d61a534e5de.zip
mod_pubsub: Support for setting a disco name
Diffstat (limited to 'plugins/mod_pubsub.lua')
-rw-r--r--plugins/mod_pubsub.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/mod_pubsub.lua b/plugins/mod_pubsub.lua
index 465bcb00..fd307583 100644
--- a/plugins/mod_pubsub.lua
+++ b/plugins/mod_pubsub.lua
@@ -9,6 +9,8 @@ local xmlns_pubsub_event = "http://jabber.org/protocol/pubsub#event";
local autocreate_on_publish = module:get_option_boolean("autocreate_on_publish", false);
local autocreate_on_subscribe = module:get_option_boolean("autocreate_on_subscribe", false);
+local pubsub_disco_name = module:get_option("name");
+if type(pubsub_disco_name) ~= "string" then pubsub_disco_name = "Prosody PubSub Service"; end
local service;
@@ -217,7 +219,7 @@ end
local function build_disco_info(service)
local disco_info = st.stanza("query", { xmlns = "http://jabber.org/protocol/disco#info" })
- :tag("identity", { category = "pubsub", type = "service" }):up()
+ :tag("identity", { category = "pubsub", type = "service", name = pubsub_disco_name }):up()
:tag("feature", { var = "http://jabber.org/protocol/pubsub" }):up();
add_disco_features_from_service(disco_info, service);
return disco_info;
@@ -359,4 +361,4 @@ set_service(pubsub.new({
get_affiliation = get_affiliation;
normalize_jid = jid_bare;
-}));
+})); \ No newline at end of file