feat: closes #11432, use edited time if its greater

isekai-main
Barış Soner Uşaklı 2 years ago
parent 9f2d1f7ed1
commit c3854b786e

@ -207,6 +207,10 @@ async function addTags(topicData, req, res) {
}
description = description.replace(/\n/g, ' ');
const mainPost = postIndex === 0 && postAtIndex ?
postAtIndex :
await topics.getMainPost(topicData.tid, req.uid);
res.locals.metaTags = [
{
name: 'title',
@ -234,7 +238,7 @@ async function addTags(topicData, req, res) {
},
{
property: 'article:modified_time',
content: utils.toISOString(topicData.lastposttime),
content: utils.toISOString(Math.max(topicData.lastposttime, mainPost && mainPost.edited)),
},
{
property: 'article:section',

Loading…
Cancel
Save