Use originallyPublishedAt from body on import if it exists
authorChocobozzz <me@florianbigard.com>
Fri, 17 Apr 2020 12:35:13 +0000 (14:35 +0200)
committerChocobozzz <me@florianbigard.com>
Fri, 17 Apr 2020 12:35:13 +0000 (14:35 +0200)
server/controllers/api/videos/import.ts

index fb9d73140601dfeceaacfa96c1833e4a40f06def..f4630375eea7cc4c770faf0d6813c864b33e18a9 100644 (file)
@@ -231,7 +231,7 @@ function buildVideo (channelId: number, body: VideoImportCreate, importData: You
     privacy: body.privacy || VideoPrivacy.PRIVATE,
     duration: 0, // duration will be set by the import job
     channelId: channelId,
-    originallyPublishedAt: importData.originallyPublishedAt
+    originallyPublishedAt: body.originallyPublishedAt || importData.originallyPublishedAt
   }
   const video = new VideoModel(videoData)
   video.url = getVideoActivityPubUrl(video)