changeset 14037:cc916272c30f 13.0

mod_pubsub: Error if loaded outside of a component This may change in the future, if we decide to support pubsub on hosts, but we would need to resolve e.g. #1808 first.
author Matthew Wild <mwild1@gmail.com>
date Mon, 12 Jan 2026 17:13:06 +0000
parents dab1a4002cb5
children 1a2691bd50bd
files plugins/mod_pubsub/mod_pubsub.lua
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_pubsub/mod_pubsub.lua	Mon Jan 12 07:05:40 2026 +0100
+++ b/plugins/mod_pubsub/mod_pubsub.lua	Mon Jan 12 17:13:06 2026 +0000
@@ -1,3 +1,7 @@
+if module:get_host_type() ~= "component" then
+	error("Pubsub should be loaded as a component, please see https://prosody.im/doc/modules/mod_pubsub", 0);
+end
+
 local pubsub = require "prosody.util.pubsub";
 local st = require "prosody.util.stanza";
 local jid_bare = require "prosody.util.jid".bare;