# HG changeset patch # User Matthew Wild # Date 1776797659 -3600 # Node ID 01d8bfbfc435ec5d2a37363bd5b5e39907433ed7 # Parent b66c9327653422349d742fa0ff1203053aa20537 mod_pubsub_serverinfo: Fix check for local domain The module was checking whether a host exists, but this may be misleading if our host is loaded before the host that is being checked. This change makes it check the config. This will provide a false positive in the rare case that the host is defined but not activated/enabled. But we don't have an API currently for "is this host configured and enabled?" diff -r b66c93276534 -r 01d8bfbfc435 mod_pubsub_serverinfo/mod_pubsub_serverinfo.lua --- a/mod_pubsub_serverinfo/mod_pubsub_serverinfo.lua Thu Apr 16 12:19:48 2026 +0200 +++ b/mod_pubsub_serverinfo/mod_pubsub_serverinfo.lua Tue Apr 21 19:54:19 2026 +0100 @@ -1,3 +1,4 @@ +local config = require "core.configmanager"; local http = require "net.http"; local json = require "util.json"; local st = require "util.stanza"; @@ -14,7 +15,8 @@ local persist_items = module:get_option_boolean(module.name.."_persist_items", true); local include_user_count = module:get_option_boolean(module.name.."_publish_user_count", false); -if not service and prosody.hosts["pubsub."..module.host] then +if not service and config.getconfig()["pubsub."..module.host] then + -- Only use this default if such a domain is found in the config service = "pubsub."..module.host; end if not service then