mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-02 05:40:43 +01:00
feat: up emoji, remove title parse code
This commit is contained in:
@@ -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 };
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user