feat: up emoji, remove title parse code

isekai-main
Barış Soner Uşaklı 2 years ago
parent 6d5a2635ba
commit 78f793473d

@ -93,7 +93,7 @@
"nodebb-plugin-2factor": "7.0.5",
"nodebb-plugin-composer-default": "10.1.5",
"nodebb-plugin-dbsearch": "6.0.0",
"nodebb-plugin-emoji": "5.0.8",
"nodebb-plugin-emoji": "5.0.9",
"nodebb-plugin-emoji-android": "4.0.0",
"nodebb-plugin-markdown": "12.0.2",
"nodebb-plugin-mentions": "4.1.1",

@ -80,20 +80,13 @@ module.exports = function (Posts) {
'uid', 'tid', 'title', 'cid', 'tags', 'slug',
'deleted', 'scheduled', 'postcount', 'mainPid', 'teaserPid',
]);
async function parseTitles() {
await Promise.all(topicsData.map(async (t) => {
t.title = await plugins.hooks.fire('filter:parse.raw', t.title);
}));
}
const cids = _.uniq(topicsData.map(topic => topic && topic.cid));
const [categoriesData] = await Promise.all([
categories.getCategoriesFields(cids, [
'cid', 'name', 'icon', 'slug', 'parentCid',
'bgColor', 'color', 'backgroundImage', 'imageClass',
]),
parseTitles(),
const categoriesData = await categories.getCategoriesFields(cids, [
'cid', 'name', 'icon', 'slug', 'parentCid',
'bgColor', 'color', 'backgroundImage', 'imageClass',
]);
return { topics: topicsData, categories: categoriesData };
}

Loading…
Cancel
Save