Fix comments feed
This commit is contained in:
parent
566c125d6e
commit
c334097734
|
@ -57,19 +57,22 @@ async function generateVideoCommentsFeed (req: express.Request, res: express.Res
|
||||||
const link = WEBSERVER.URL + comment.getCommentStaticPath()
|
const link = WEBSERVER.URL + comment.getCommentStaticPath()
|
||||||
|
|
||||||
let title = comment.Video.name
|
let title = comment.Video.name
|
||||||
if (comment.Account) title += ` - ${comment.Account.getDisplayName()}`
|
const author: { name: string, link: string }[] = []
|
||||||
|
|
||||||
|
if (comment.Account) {
|
||||||
|
title += ` - ${comment.Account.getDisplayName()}`
|
||||||
|
author.push({
|
||||||
|
name: comment.Account.getDisplayName(),
|
||||||
|
link: comment.Account.Actor.url
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
feed.addItem({
|
feed.addItem({
|
||||||
title,
|
title,
|
||||||
id: comment.url,
|
id: comment.url,
|
||||||
link,
|
link,
|
||||||
content: comment.text,
|
content: comment.text,
|
||||||
author: [
|
author,
|
||||||
{
|
|
||||||
name: comment.Account.getDisplayName(),
|
|
||||||
link: comment.Account.Actor.url
|
|
||||||
}
|
|
||||||
],
|
|
||||||
date: comment.createdAt
|
date: comment.createdAt
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue