From f713f36bdf6f696ab0fe8a309035a09e864a48ca Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 14 Nov 2022 12:06:31 +0100 Subject: Federate entire description Introduce an explicit field truncatedDescription description in video list is deprecated description in video get will contain the entire description --- server/models/video/formatter/video-format-utils.ts | 2 ++ 1 file changed, 2 insertions(+) (limited to 'server/models/video/formatter') diff --git a/server/models/video/formatter/video-format-utils.ts b/server/models/video/formatter/video-format-utils.ts index 76745f4b5..240619f69 100644 --- a/server/models/video/formatter/video-format-utils.ts +++ b/server/models/video/formatter/video-format-utils.ts @@ -103,6 +103,7 @@ function videoModelToFormattedJSON (video: MVideoFormattable, options: VideoForm }, nsfw: video.nsfw, + truncatedDescription: video.getTruncatedDescription(), description: options && options.completeDescription === true ? video.description : video.getTruncatedDescription(), @@ -181,6 +182,7 @@ function videoModelToFormattedDetailsJSON (video: MVideoFormattableDetails): Vid const span = tracer.startSpan('peertube.VideoModel.toFormattedDetailsJSON') const videoJSON = video.toFormattedJSON({ + completeDescription: true, additionalAttributes: { scheduledUpdate: true, blacklistInfo: true, -- cgit v1.2.3