mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-12-31 21:00:24 +01:00
perf: move attachments to post hash
This commit is contained in:
@@ -67,5 +67,8 @@ function modifyPost(post, fields) {
|
||||
if (post.hasOwnProperty('edited')) {
|
||||
post.editedISO = post.edited !== 0 ? utils.toISOString(post.edited) : '';
|
||||
}
|
||||
if (!fields.length || fields.includes('attachments')) {
|
||||
post.attachments = (post.attachments || '').split(',').filter(Boolean);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user