Use local object URLs for feeds
This commit is contained in:
parent
3d5de919f3
commit
4dae00e68b
2 changed files with 5 additions and 3 deletions
|
@ -46,10 +46,12 @@ async function generateVideoCommentsFeed (req: express.Request, res: express.Res
|
||||||
|
|
||||||
// Adding video items to the feed, one at a time
|
// Adding video items to the feed, one at a time
|
||||||
comments.forEach(comment => {
|
comments.forEach(comment => {
|
||||||
|
const link = CONFIG.WEBSERVER.URL + '/videos/watch/' + comment.Video.uuid + ';threadId=' + comment.getThreadId()
|
||||||
|
|
||||||
feed.addItem({
|
feed.addItem({
|
||||||
title: `${comment.Video.name} - ${comment.Account.getDisplayName()}`,
|
title: `${comment.Video.name} - ${comment.Account.getDisplayName()}`,
|
||||||
id: comment.url,
|
id: comment.url,
|
||||||
link: comment.url,
|
link,
|
||||||
content: comment.text,
|
content: comment.text,
|
||||||
author: [
|
author: [
|
||||||
{
|
{
|
||||||
|
@ -111,7 +113,7 @@ async function generateVideoFeed (req: express.Request, res: express.Response, n
|
||||||
feed.addItem({
|
feed.addItem({
|
||||||
title: video.name,
|
title: video.name,
|
||||||
id: video.url,
|
id: video.url,
|
||||||
link: video.url,
|
link: CONFIG.WEBSERVER.URL + '/videos/watch/' + video.uuid,
|
||||||
description: video.getTruncatedDescription(),
|
description: video.getTruncatedDescription(),
|
||||||
content: video.description,
|
content: video.description,
|
||||||
author: [
|
author: [
|
||||||
|
|
|
@ -348,7 +348,7 @@ export class VideoCommentModel extends Model<VideoCommentModel> {
|
||||||
where: {},
|
where: {},
|
||||||
include: [
|
include: [
|
||||||
{
|
{
|
||||||
attributes: [ 'name' ],
|
attributes: [ 'name', 'uuid' ],
|
||||||
model: VideoModel.unscoped(),
|
model: VideoModel.unscoped(),
|
||||||
required: true
|
required: true
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue