aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/video/formatter
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-11-14 12:06:31 +0100
committerChocobozzz <me@florianbigard.com>2022-11-14 13:03:54 +0100
commitf713f36bdf6f696ab0fe8a309035a09e864a48ca (patch)
tree3135c3a51fec3f1add56ff0ed559a5c9c499914a /server/models/video/formatter
parent44e702ded455c118f9908b70d25e7c7e5512abe9 (diff)
downloadPeerTube-f713f36bdf6f696ab0fe8a309035a09e864a48ca.tar.gz
PeerTube-f713f36bdf6f696ab0fe8a309035a09e864a48ca.tar.zst
PeerTube-f713f36bdf6f696ab0fe8a309035a09e864a48ca.zip
Federate entire description
Introduce an explicit field truncatedDescription description in video list is deprecated description in video get will contain the entire description
Diffstat (limited to 'server/models/video/formatter')
-rw-r--r--server/models/video/formatter/video-format-utils.ts2
1 files changed, 2 insertions, 0 deletions
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
103 }, 103 },
104 nsfw: video.nsfw, 104 nsfw: video.nsfw,
105 105
106 truncatedDescription: video.getTruncatedDescription(),
106 description: options && options.completeDescription === true 107 description: options && options.completeDescription === true
107 ? video.description 108 ? video.description
108 : video.getTruncatedDescription(), 109 : video.getTruncatedDescription(),
@@ -181,6 +182,7 @@ function videoModelToFormattedDetailsJSON (video: MVideoFormattableDetails): Vid
181 const span = tracer.startSpan('peertube.VideoModel.toFormattedDetailsJSON') 182 const span = tracer.startSpan('peertube.VideoModel.toFormattedDetailsJSON')
182 183
183 const videoJSON = video.toFormattedJSON({ 184 const videoJSON = video.toFormattedJSON({
185 completeDescription: true,
184 additionalAttributes: { 186 additionalAttributes: {
185 scheduledUpdate: true, 187 scheduledUpdate: true,
186 blacklistInfo: true, 188 blacklistInfo: true,