X-Git-Url: https://git.enpas.org/?a=blobdiff_plain;f=plugins%2Fmod_pubsub.lua;h=fd307583c94ca1ad077e22d9e6ce9bd1cf05fc84;hb=1881612f6e77c771984d73b85704e89818a82977;hp=465bcb00007f6c07b06cd8c6b1c2d5e540dfae01;hpb=c66cc52a698c80e695669910c338fca24a15fd28;p=prosody.git 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