From 4dae00e68b71ee3725a94eef891f3c43e10040b0 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 14 Jun 2018 11:25:19 +0200 Subject: [PATCH] Use local object URLs for feeds --- server/controllers/feeds.ts | 6 ++++-- server/models/video/video-comment.ts | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/server/controllers/feeds.ts b/server/controllers/feeds.ts index ece5dc067..ce57e5c11 100644 --- a/server/controllers/feeds.ts +++ b/server/controllers/feeds.ts @@ -46,10 +46,12 @@ async function generateVideoCommentsFeed (req: express.Request, res: express.Res // Adding video items to the feed, one at a time comments.forEach(comment => { + const link = CONFIG.WEBSERVER.URL + '/videos/watch/' + comment.Video.uuid + ';threadId=' + comment.getThreadId() + feed.addItem({ title: `${comment.Video.name} - ${comment.Account.getDisplayName()}`, id: comment.url, - link: comment.url, + link, content: comment.text, author: [ { @@ -111,7 +113,7 @@ async function generateVideoFeed (req: express.Request, res: express.Response, n feed.addItem({ title: video.name, id: video.url, - link: video.url, + link: CONFIG.WEBSERVER.URL + '/videos/watch/' + video.uuid, description: video.getTruncatedDescription(), content: video.description, author: [ diff --git a/server/models/video/video-comment.ts b/server/models/video/video-comment.ts index 86766a5d1..f93d81d67 100644 --- a/server/models/video/video-comment.ts +++ b/server/models/video/video-comment.ts @@ -348,7 +348,7 @@ export class VideoCommentModel extends Model { where: {}, include: [ { - attributes: [ 'name' ], + attributes: [ 'name', 'uuid' ], model: VideoModel.unscoped(), required: true }