]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/models/video/video-format-utils.ts
Merge branch 'develop' into pr/1285
[github/Chocobozzz/PeerTube.git] / server / models / video / video-format-utils.ts
index 76d0445d4bb5ecdc697f0b31ee7f17bb80e316b1..c63285e25ae6aafcebb331365d6159fc21005e8c 100644 (file)
@@ -67,6 +67,7 @@ function videoModelToFormattedJSON (video: VideoModel, options?: VideoFormatting
     createdAt: video.createdAt,
     updatedAt: video.updatedAt,
     publishedAt: video.publishedAt,
+    originallyPublishedAt: video.originallyPublishedAt,
     account: {
       id: formattedAccount.id,
       uuid: formattedAccount.uuid,
@@ -323,6 +324,9 @@ function videoModelToActivityPubObject (video: VideoModel): VideoTorrentObject {
     commentsEnabled: video.commentsEnabled,
     downloadEnabled: video.downloadEnabled,
     published: video.publishedAt.toISOString(),
+    originallyPublishedAt: video.originallyPublishedAt ?
+      video.originallyPublishedAt.toISOString() :
+      null,
     updated: video.updatedAt.toISOString(),
     mediaType: 'text/markdown',
     content: video.getTruncatedDescription(),