aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2018-02-23 17:11:59 +0100
committerKim Alvefur <zash@zash.se>2018-02-23 17:11:59 +0100
commit61c6bb76de017098bc74e77310d2689845c22b5a (patch)
tree16e94fa7109d0a56e982050ed3efda7b69eb39c3
parent7a08d4ca2777bda6abf220d17f69ef5d8338211e (diff)
downloadprosody-61c6bb76de017098bc74e77310d2689845c22b5a.tar.gz
prosody-61c6bb76de017098bc74e77310d2689845c22b5a.zip
moduleapi: Remove unused and undocumented :has_feature and :has_identity
-rw-r--r--.luacheckrc2
-rw-r--r--core/moduleapi.lua14
2 files changed, 0 insertions, 16 deletions
diff --git a/.luacheckrc b/.luacheckrc
index b5ad23e0..607db06d 100644
--- a/.luacheckrc
+++ b/.luacheckrc
@@ -55,8 +55,6 @@ files["plugins/"] = {
"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 --git a/core/moduleapi.lua b/core/moduleapi.lua
index 2eae35fc..64c4ce43 100644
--- a/core/moduleapi.lua
+++ b/core/moduleapi.lua
@@ -71,20 +71,6 @@ end
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(...);