mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
fix: add sourceContent to getPostSummaryByPids
ap posts wasnt showing any content in mobile navigator
This commit is contained in:
@@ -22,7 +22,7 @@ module.exports = function (Posts) {
|
|||||||
options.escape = options.hasOwnProperty('escape') ? options.escape : false;
|
options.escape = options.hasOwnProperty('escape') ? options.escape : false;
|
||||||
options.extraFields = options.hasOwnProperty('extraFields') ? options.extraFields : [];
|
options.extraFields = options.hasOwnProperty('extraFields') ? options.extraFields : [];
|
||||||
|
|
||||||
const fields = ['pid', 'tid', 'toPid', 'url', 'content', 'uid', 'timestamp', 'deleted', 'upvotes', 'downvotes', 'replies', 'handle'].concat(options.extraFields);
|
const fields = ['pid', 'tid', 'toPid', 'url', 'content', 'sourceContent', 'uid', 'timestamp', 'deleted', 'upvotes', 'downvotes', 'replies', 'handle'].concat(options.extraFields);
|
||||||
|
|
||||||
let posts = await Posts.getPostsFields(pids, fields);
|
let posts = await Posts.getPostsFields(pids, fields);
|
||||||
posts = posts.filter(Boolean);
|
posts = posts.filter(Boolean);
|
||||||
|
|||||||
Reference in New Issue
Block a user