Skip to content

Node.js based forum software built for the modern web

feat: filter:settings.get plugin hook

Julian Lamc7d15dfa94d2
diff --git a/src/meta/settings.js b/src/meta/settings.js
index 859db5c267..8d4d4a6863 100644
--- a/src/meta/settings.js
+++ b/src/meta/settings.js
@@ -8,7 +8,7 @@ const pubsub = require('../pubsub');
const Settings = module.exports;
Settings.get = async function (hash) {
- const data = await db.getObject('settings:' + hash) || {};
+ let data = await db.getObject('settings:' + hash) || {};
const sortedLists = await db.getSetMembers('settings:' + hash + ':sorted-lists');
await Promise.all(sortedLists.map(async function (list) {
@@ -26,6 +26,7 @@ Settings.get = async function (hash) {
});
}));
+ ({ values: data } = await plugins.fireHook('filter:settings.get', { plugin: hash, values: data }));
return data;
};