Mercurial > prosody-hg
comparison plugins/mod_pubsub/mod_pubsub.lua @ 7980:241f02bd66ce
mod_pubsub: Rely on type checking in module API
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Thu, 16 Mar 2017 21:02:40 +0100 |
| parents | c420a38db5ef |
| children | e30b0cbed472 879be73c0a58 |
comparison
equal
deleted
inserted
replaced
| 7979:a1e88642411d | 7980:241f02bd66ce |
|---|---|
| 7 local xmlns_pubsub_event = "http://jabber.org/protocol/pubsub#event"; | 7 local xmlns_pubsub_event = "http://jabber.org/protocol/pubsub#event"; |
| 8 local xmlns_pubsub_owner = "http://jabber.org/protocol/pubsub#owner"; | 8 local xmlns_pubsub_owner = "http://jabber.org/protocol/pubsub#owner"; |
| 9 | 9 |
| 10 local autocreate_on_publish = module:get_option_boolean("autocreate_on_publish", false); | 10 local autocreate_on_publish = module:get_option_boolean("autocreate_on_publish", false); |
| 11 local autocreate_on_subscribe = module:get_option_boolean("autocreate_on_subscribe", false); | 11 local autocreate_on_subscribe = module:get_option_boolean("autocreate_on_subscribe", false); |
| 12 local pubsub_disco_name = module:get_option("name"); | 12 local pubsub_disco_name = module:get_option_string("name" "Prosody PubSub Service"); |
| 13 if type(pubsub_disco_name) ~= "string" then pubsub_disco_name = "Prosody PubSub Service"; end | |
| 14 local expose_publisher = module:get_option_boolean("expose_publisher", false) | 13 local expose_publisher = module:get_option_boolean("expose_publisher", false) |
| 15 | 14 |
| 16 local service; | 15 local service; |
| 17 | 16 |
| 18 local lib_pubsub = module:require "pubsub"; | 17 local lib_pubsub = module:require "pubsub"; |
