aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--server/controllers/feeds.ts17
1 files changed, 10 insertions, 7 deletions
diff --git a/server/controllers/feeds.ts b/server/controllers/feeds.ts
index ba5a476e7..fa6c7ac71 100644
--- a/server/controllers/feeds.ts
+++ b/server/controllers/feeds.ts
@@ -57,19 +57,22 @@ async function generateVideoCommentsFeed (req: express.Request, res: express.Res
57 const link = WEBSERVER.URL + comment.getCommentStaticPath() 57 const link = WEBSERVER.URL + comment.getCommentStaticPath()
58 58
59 let title = comment.Video.name 59 let title = comment.Video.name
60 if (comment.Account) title += ` - ${comment.Account.getDisplayName()}` 60 const author: { name: string, link: string }[] = []
61
62 if (comment.Account) {
63 title += ` - ${comment.Account.getDisplayName()}`
64 author.push({
65 name: comment.Account.getDisplayName(),
66 link: comment.Account.Actor.url
67 })
68 }
61 69
62 feed.addItem({ 70 feed.addItem({
63 title, 71 title,
64 id: comment.url, 72 id: comment.url,
65 link, 73 link,
66 content: comment.text, 74 content: comment.text,
67 author: [ 75 author,
68 {
69 name: comment.Account.getDisplayName(),
70 link: comment.Account.Actor.url
71 }
72 ],
73 date: comment.createdAt 76 date: comment.createdAt
74 }) 77 })
75 }) 78 })