Mercurial > prosody-modules
comparison mod_pubsub_serverinfo/mod_pubsub_serverinfo.lua @ 5885:54b451c3790c
mod_pubsub_serverinfo: Fix for compatibility with 0.12 option getters
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Tue, 16 Apr 2024 12:58:08 +0100 |
| parents | 49b0873932ca |
| children | 2c85397d7241 |
comparison
equal
deleted
inserted
replaced
| 5884:49b0873932ca | 5885:54b451c3790c |
|---|---|
| 3 local st = require "util.stanza"; | 3 local st = require "util.stanza"; |
| 4 local new_id = require"util.id".medium; | 4 local new_id = require"util.id".medium; |
| 5 | 5 |
| 6 local local_domain = module:get_host(); | 6 local local_domain = module:get_host(); |
| 7 local service = module:get_option_string(module.name .. "_service"); | 7 local service = module:get_option_string(module.name .. "_service"); |
| 8 local node = module:get_option_integer(module.name .. "_node", "serverinfo"); | 8 local node = module:get_option_number(module.name .. "_node", "serverinfo"); |
| 9 local actor = module.host .. "/modules/" .. module.name; | 9 local actor = module.host .. "/modules/" .. module.name; |
| 10 local publication_interval = module:get_option_integer(module.name .. "_publication_interval", 300); | 10 local publication_interval = module:get_option_number(module.name .. "_publication_interval", 300); |
| 11 local cache_ttl = module:get_option_integer(module.name .. "_cache_ttl", 3600); | 11 local cache_ttl = module:get_option_number(module.name .. "_cache_ttl", 3600); |
| 12 local public_providers_url = module:get_option_string(module.name.."_public_providers_url", "https://data.xmpp.net/providers/v2/providers-Ds.json"); | 12 local public_providers_url = module:get_option_string(module.name.."_public_providers_url", "https://data.xmpp.net/providers/v2/providers-Ds.json"); |
| 13 local delete_node_on_unload = module:get_option_boolean(module.name.."_delete_node_on_unload", false); | 13 local delete_node_on_unload = module:get_option_boolean(module.name.."_delete_node_on_unload", false); |
| 14 local persist_items = module:get_option_boolean(module.name.."_persist_items", true); | 14 local persist_items = module:get_option_boolean(module.name.."_persist_items", true); |
| 15 | 15 |
| 16 if not service and prosody.hosts["pubsub."..module.host] then | 16 if not service and prosody.hosts["pubsub."..module.host] then |
