mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-02-26 16:41:21 +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-2factor": "7.0.5",
|
||||||
"nodebb-plugin-composer-default": "10.1.5",
|
"nodebb-plugin-composer-default": "10.1.5",
|
||||||
"nodebb-plugin-dbsearch": "6.0.0",
|
"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-emoji-android": "4.0.0",
|
||||||
"nodebb-plugin-markdown": "12.0.2",
|
"nodebb-plugin-markdown": "12.0.2",
|
||||||
"nodebb-plugin-mentions": "4.1.1",
|
"nodebb-plugin-mentions": "4.1.1",
|
||||||
|
|||||||
@@ -80,20 +80,13 @@ module.exports = function (Posts) {
|
|||||||
'uid', 'tid', 'title', 'cid', 'tags', 'slug',
|
'uid', 'tid', 'title', 'cid', 'tags', 'slug',
|
||||||
'deleted', 'scheduled', 'postcount', 'mainPid', 'teaserPid',
|
'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 cids = _.uniq(topicsData.map(topic => topic && topic.cid));
|
||||||
const [categoriesData] = await Promise.all([
|
const categoriesData = await categories.getCategoriesFields(cids, [
|
||||||
categories.getCategoriesFields(cids, [
|
'cid', 'name', 'icon', 'slug', 'parentCid',
|
||||||
'cid', 'name', 'icon', 'slug', 'parentCid',
|
'bgColor', 'color', 'backgroundImage', 'imageClass',
|
||||||
'bgColor', 'color', 'backgroundImage', 'imageClass',
|
|
||||||
]),
|
|
||||||
parseTitles(),
|
|
||||||
]);
|
]);
|
||||||
|
|
||||||
return { topics: topicsData, categories: categoriesData };
|
return { topics: topicsData, categories: categoriesData };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user