mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-02 05:40:43 +01:00
fix: #9100 topic thumbs in OG image tags
This commit is contained in:
@@ -255,8 +255,8 @@ async function addOGImageTags(res, topicData, postAtIndex) {
|
||||
upload.name = url + upload_url + '/files/' + upload.name;
|
||||
return upload;
|
||||
});
|
||||
if (topicData.thumb) {
|
||||
images.push(topicData.thumb);
|
||||
if (topicData.thumbs) {
|
||||
images.push(...topicData.thumbs.map(thumbObj => ({ name: nconf.get('url') + thumbObj.url })));
|
||||
}
|
||||
if (topicData.category.backgroundImage && (!postAtIndex || !postAtIndex.index)) {
|
||||
images.push(topicData.category.backgroundImage);
|
||||
|
||||
Reference in New Issue
Block a user