# HG changeset patch # User Jonas Schäfer # Date 1611671999 -3600 # Node ID e5792ca1d704158f0c67ed48f0c23d00dfb3e6aa # Parent 679a0c9d365dc6d3774cec54aa292941db58908e mod_groups_internal: fix default value and handling of groups_muc_host - The new default fits the Snikket config - The error messages have been made clearer for operators to debug diff -r 679a0c9d365d -r e5792ca1d704 mod_groups_internal/mod_groups_internal.lua --- a/mod_groups_internal/mod_groups_internal.lua Tue Jan 26 15:37:52 2021 +0100 +++ b/mod_groups_internal/mod_groups_internal.lua Tue Jan 26 15:39:59 2021 +0100 @@ -9,7 +9,7 @@ local group_members_store = module:open_store("groups"); local group_memberships = module:open_store("groups", "map"); -local muc_host_name = module:get_option("groups_muc_host", "chats."..host); +local muc_host_name = module:get_option("groups_muc_host", "groups."..host); local muc_host = nil; local is_contact_subscribed = rostermanager.is_contact_subscribed; @@ -245,11 +245,16 @@ end local function handle_server_started() + if not muc_host_name then + module:log("info", "MUC management disabled (groups_muc_host set to nil)") + return + end + local target_module = modulemanager.get_module(muc_host_name, "muc") if not target_module then - module:log("error", "host %s is not a MUC host -- group management will not work correctly", muc_host_name) + module:log("error", "host %s is not a MUC host -- group management will not work correctly; check your groups_muc_host setting!", muc_host_name) else - module:log("debug", "found MUC host") + module:log("debug", "found MUC host at %s", muc_host_name) muc_host = target_module; end end