mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 08:36:12 +01:00
fix: regression where filter:settings.set no longer received sorted-lists
This commit is contained in:
@@ -44,6 +44,8 @@ Settings.getOne = async function (hash, field) {
|
||||
Settings.set = async function (hash, values, quiet) {
|
||||
quiet = quiet || false;
|
||||
|
||||
({ plugin: hash, settings: values, quiet } = await plugins.hooks.fire('filter:settings.set', { plugin: hash, settings: values, quiet }));
|
||||
|
||||
const sortedListData = {};
|
||||
for (const key in values) {
|
||||
if (values.hasOwnProperty(key)) {
|
||||
@@ -55,8 +57,6 @@ Settings.set = async function (hash, values, quiet) {
|
||||
}
|
||||
const sortedLists = Object.keys(sortedListData);
|
||||
|
||||
({ plugin: hash, settings: values, quiet } = await plugins.hooks.fire('filter:settings.set', { plugin: hash, settings: values, quiet }));
|
||||
|
||||
if (sortedLists.length) {
|
||||
await db.delete('settings:' + hash + ':sorted-lists');
|
||||
await db.setAdd('settings:' + hash + ':sorted-lists', sortedLists);
|
||||
|
||||
Reference in New Issue
Block a user