Skip to content

Node.js based forum software built for the modern web

fix: #9100 topic thumbs in OG image tags

Julian Lamab98740821b4
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);