# HG changeset patch
# User Kim Alvefur <zash@zash.se>
# Date 1489694560 -3600
# Node ID 241f02bd66ceb280302a6dcbd06e8293396eec5b
# Parent  a1e88642411d824f279f01d08ba401f9c8d228e3
mod_pubsub: Rely on type checking in module API

diff -r a1e88642411d -r 241f02bd66ce plugins/mod_pubsub/mod_pubsub.lua
--- a/plugins/mod_pubsub/mod_pubsub.lua	Thu Mar 16 21:01:45 2017 +0100
+++ b/plugins/mod_pubsub/mod_pubsub.lua	Thu Mar 16 21:02:40 2017 +0100
@@ -9,8 +9,7 @@
 
 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 pubsub_disco_name = module:get_option_string("name" "Prosody PubSub Service");
 local expose_publisher = module:get_option_boolean("expose_publisher", false)
 
 local service;