diff options
author | Matthew Wild <mwild1@gmail.com> | 2022-02-04 15:42:13 +0000 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2022-02-04 15:42:13 +0000 |
commit | b9170457854e177a50d77a758900256baf44d4ac (patch) | |
tree | 6e7c899f059cdaa545798c96668758d1a3ce8c70 | |
parent | f728cb77673d0bc95bc1646fff71ae62bbdb70cc (diff) | |
download | prosody-b9170457854e177a50d77a758900256baf44d4ac.tar.gz prosody-b9170457854e177a50d77a758900256baf44d4ac.zip |
modulemanager: Shorten metadata keys to improve readability and memorability
-rw-r--r-- | core/modulemanager.lua | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/core/modulemanager.lua b/core/modulemanager.lua index 669df440..3bf571ad 100644 --- a/core/modulemanager.lua +++ b/core/modulemanager.lua @@ -66,16 +66,16 @@ local loader = pluginloader.init({ end end - if metadata.conflicts_core_features then - local conflicts_core_features = set.new(array.collect(metadata.conflicts_core_features:gmatch("[^, ]+"))); - local conflicted_features = set.intersection(conflicts_core_features, core_features); + if metadata.conflicts then + local conflicts_features = set.new(array.collect(metadata.conflicts:gmatch("[^, ]+"))); + local conflicted_features = set.intersection(conflicts_features, core_features); if not conflicted_features:empty() then log("warn", "Not loading module, due to conflicting features '%s': %s", conflicted_features, path); return; -- Don't load this module end end - if metadata.requires_core_features then - local required_features = set.new(array.collect(metadata.requires_core_features:gmatch("[^, ]+"))); + if metadata.requires then + local required_features = set.new(array.collect(metadata.requires:gmatch("[^, ]+"))); local missing_features = required_features - core_features; if not missing_features:empty() then log("warn", "Not loading module, due to missing features '%s': %s", missing_features, path); |