Merge branch 'master' into develop

This commit is contained in:
Barış Soner Uşaklı
2025-02-28 14:37:16 -05:00
3 changed files with 11 additions and 5 deletions

View File

@@ -103,7 +103,7 @@
"nodebb-plugin-dbsearch": "6.2.13",
"nodebb-plugin-emoji": "6.0.2",
"nodebb-plugin-emoji-android": "4.1.1",
"nodebb-plugin-markdown": "13.1.0",
"nodebb-plugin-markdown": "13.1.1",
"nodebb-plugin-mentions": "4.7.0",
"nodebb-plugin-spam-be-gone": "2.3.1",
"nodebb-plugin-web-push": "0.7.3",

View File

@@ -275,8 +275,12 @@ async function fireActionHook(hook, hookList, params) {
winston.warn(`[plugins] Expected method for hook '${hook}' in plugin '${hookObj.id}' not found, skipping.`);
}
} else {
// eslint-disable-next-line
await hookObj.method(params);
try {
// eslint-disable-next-line
await hookObj.method(params);
} catch (err) {
winston.error(`[plugins] Error in hook ${hookObj.id}@${hookObj.hook} \n${err.stack}`);
}
}
}
}

View File

@@ -234,7 +234,9 @@ module.exports = function (User) {
}
async function deleteImages(uid) {
const folder = path.join(nconf.get('upload_path'), 'profile', `uid-${uid}`);
await rimraf(folder);
if (utils.isNumber(uid)) {
const folder = path.join(nconf.get('upload_path'), 'profile', `uid-${uid}`);
await rimraf(folder);
}
}
};