X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fmodels%2Fvideo%2Fvideo-format-utils.ts;h=c63285e25ae6aafcebb331365d6159fc21005e8c;hb=b718fd22374d64534bcfe69932cf562894abed6a;hp=76d0445d4bb5ecdc697f0b31ee7f17bb80e316b1;hpb=501e961199578129629cf0567033d13efced9904;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/models/video/video-format-utils.ts b/server/models/video/video-format-utils.ts index 76d0445d4..c63285e25 100644 --- a/server/models/video/video-format-utils.ts +++ b/server/models/video/video-format-utils.ts @@ -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(),