From: Chocobozzz Date: Fri, 17 Apr 2020 12:35:13 +0000 (+0200) Subject: Use originallyPublishedAt from body on import if it exists X-Git-Tag: v2.2.0-rc.1~180 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=8a86e5dc4f04d7fb07d012fbe2cb7ab3baadbf19;p=oweals%2Fpeertube.git Use originallyPublishedAt from body on import if it exists --- diff --git a/server/controllers/api/videos/import.ts b/server/controllers/api/videos/import.ts index fb9d73140..f4630375e 100644 --- a/server/controllers/api/videos/import.ts +++ b/server/controllers/api/videos/import.ts @@ -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)