# HG changeset patch # User Kim Alvefur # Date 1519402319 -3600 # Node ID 66cdf5c7af85dafd631b62b09f81000800804e91 # Parent 17c754b81234078a58d745449880f0e6fd90310d moduleapi: Remove unused and undocumented :has_feature and :has_identity diff -r 17c754b81234 -r 66cdf5c7af85 .luacheckrc --- a/.luacheckrc Fri Feb 23 17:10:21 2018 +0100 +++ b/.luacheckrc Fri Feb 23 17:11:59 2018 +0100 @@ -55,8 +55,6 @@ "module.get_option_set", "module.get_option_string", "module.handle_items", - "module.has_feature", - "module.has_identity", "module.hook", "module.hook_global", "module.hook_object_event", diff -r 17c754b81234 -r 66cdf5c7af85 core/moduleapi.lua --- a/core/moduleapi.lua Fri Feb 23 17:10:21 2018 +0100 +++ b/core/moduleapi.lua Fri Feb 23 17:11:59 2018 +0100 @@ -71,20 +71,6 @@ function api:add_extension(data) self:add_item("extension", data); end -function api:has_feature(xmlns) - for _, feature in ipairs(self:get_host_items("feature")) do - if feature == xmlns then return true; end - end - return false; -end -function api:has_identity(category, identity_type, name) - for _, id in ipairs(self:get_host_items("identity")) do - if id.category == category and id.type == identity_type and id.name == name then - return true; - end - end - return false; -end function api:fire_event(...) return (hosts[self.host] or prosody).events.fire_event(...);