diff --git a/plugins/mod_sipwise_redis_mucs.lua b/plugins/mod_sipwise_redis_mucs.lua index 3fec312..5f9dfdc 100644 --- a/plugins/mod_sipwise_redis_mucs.lua +++ b/plugins/mod_sipwise_redis_mucs.lua @@ -108,9 +108,12 @@ function module.load() end function module.add_host(module) - if module:get_host_type() == "component" then + local host = module:get_host(); + local _type = module:get_host_type(); + + if _type == "component" then module:hook("muc-room-created", muc_created, 200); module:hook("muc-room-destroyed", muc_destroyed, 200); end - module:log("debug", "hooked at %s", module:get_host()); + module:log("debug", "hooked at %s as %s", host, _type); end diff --git a/plugins/mod_sipwise_redis_sessions.lua b/plugins/mod_sipwise_redis_sessions.lua index 5e2dd76..4ee8019 100644 --- a/plugins/mod_sipwise_redis_sessions.lua +++ b/plugins/mod_sipwise_redis_sessions.lua @@ -130,11 +130,12 @@ end function module.add_host(module) local host = module:get_host(); + local _type = module:get_host_type(); - if module:get_host_type() ~= "component" then + if _type ~= "component" then module:hook("resource-bind", resource_bind, 200); module:hook("resource-unbind", resource_unbind, 200); clean_local_sessions(host); - module:log("debug", "hooked at %s", host); end + module:log("debug", "hooked at %s as %s", host, _type); end