From ab98740821b4e511e7a69b90b16902f2aac7609f Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Fri, 11 Dec 2020 15:38:40 -0500 Subject: [PATCH] fix: #9100 topic thumbs in OG image tags --- src/controllers/topics.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/controllers/topics.js b/src/controllers/topics.js index 5da598ebd2..b04dd7b564 100644 --- a/src/controllers/topics.js +++ b/src/controllers/topics.js @@ -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);