Mercurial > prosody-modules
comparison mod_pubsub_serverinfo/mod_pubsub_serverinfo.lua @ 5919:99ecfe44910b
mod_pubsub_serverinfo: Explicitly depend on mod_server_info
Otherwise the pubsub node will not be advertised unless the admin explicitly
loads that module, or another module that depends on it.
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Fri, 07 Jun 2024 15:53:30 +0100 |
| parents | d4a8644a1cc5 |
| children | 25b091cbb471 |
comparison
equal
deleted
inserted
replaced
| 5918:d4a8644a1cc5 | 5919:99ecfe44910b |
|---|---|
| 20 module:log_status("warn", "No pubsub service specified - module not activated"); | 20 module:log_status("warn", "No pubsub service specified - module not activated"); |
| 21 return; | 21 return; |
| 22 end | 22 end |
| 23 | 23 |
| 24 local xmlns_pubsub = "http://jabber.org/protocol/pubsub"; | 24 local xmlns_pubsub = "http://jabber.org/protocol/pubsub"; |
| 25 | |
| 26 -- Needed to publish server-info-fields | |
| 27 module:depends("server_info"); | |
| 25 | 28 |
| 26 function module.load() | 29 function module.load() |
| 27 discover_node():next( | 30 discover_node():next( |
| 28 function(exists) | 31 function(exists) |
| 29 if not exists then create_node() end | 32 if not exists then create_node() end |
