comparison mod_mam_muc/mod_mam_muc.lua @ 1973:9329a11c03a6

mod_mam_muc: Add guard to prevent loading on normal hosts
author Kim Alvefur <zash@zash.se>
date Mon, 14 Dec 2015 11:02:13 +0100
parents db8b256f51ff
children f21147d56bc4
comparison
equal deleted inserted replaced
1972:b10118d7c0df 1973:9329a11c03a6
1 -- XEP-0313: Message Archive Management for Prosody MUC 1 -- XEP-0313: Message Archive Management for Prosody MUC
2 -- Copyright (C) 2011-2014 Kim Alvefur 2 -- Copyright (C) 2011-2014 Kim Alvefur
3 -- 3 --
4 -- This file is MIT/X11 licensed. 4 -- This file is MIT/X11 licensed.
5
6 if module:get_host_type() ~= "component" then
7 module:log("error", "mod_%s should be loaded only on a MUC component, not normal hosts", module.name);
8 return;
9 end
5 10
6 local xmlns_mam = "urn:xmpp:mam:0"; 11 local xmlns_mam = "urn:xmpp:mam:0";
7 local xmlns_delay = "urn:xmpp:delay"; 12 local xmlns_delay = "urn:xmpp:delay";
8 local xmlns_forward = "urn:xmpp:forward:0"; 13 local xmlns_forward = "urn:xmpp:forward:0";
9 local muc_form_enable_logging = "muc#roomconfig_enablelogging" 14 local muc_form_enable_logging = "muc#roomconfig_enablelogging"