+ feed.addItem({
+ title: `${comment.Video.name} - ${comment.Account.getDisplayName()}`,
+ id: comment.url,
+ link,
+ content: comment.text,
+ author: [
+ {
+ name: comment.Account.getDisplayName(),
+ link: comment.Account.Actor.url
+ }
+ ],
+ date: comment.createdAt
+ })
+ })
+
+ // Now the feed generation is done, let's send it!
+ return sendFeed(feed, req, res)
+}
+
+async function generateVideoFeed (req: express.Request, res: express.Response) {
+ const start = 0
+
+ const account = res.locals.account
+ const videoChannel = res.locals.videoChannel
+ const nsfw = buildNSFWFilter(res, req.query.nsfw)
+
+ let name: string
+ let description: string
+
+ if (videoChannel) {
+ name = videoChannel.getDisplayName()
+ description = videoChannel.description
+ } else if (account) {
+ name = account.getDisplayName()
+ description = account.description
+ } else {
+ name = CONFIG.INSTANCE.NAME
+ description = CONFIG.INSTANCE.DESCRIPTION
+ }
+
+ const feed = initFeed(name, description)
+
+ const resultList = await VideoModel.listForApi({