diff options
author | Chocobozzz <me@florianbigard.com> | 2019-02-11 14:41:55 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-02-11 15:16:39 +0100 |
commit | 7519127b5cb44095f78f6bf4c51d4ebf2b7d5e88 (patch) | |
tree | ed94c1fb00a85a1f25c15b9a82831f4999e72948 /server/lib | |
parent | 6913f69134947432a192890b2de7c2d48094e85c (diff) | |
download | PeerTube-7519127b5cb44095f78f6bf4c51d4ebf2b7d5e88.tar.gz PeerTube-7519127b5cb44095f78f6bf4c51d4ebf2b7d5e88.tar.zst PeerTube-7519127b5cb44095f78f6bf4c51d4ebf2b7d5e88.zip |
Add originallyPublishedAt unit tests
Diffstat (limited to 'server/lib')
-rw-r--r-- | server/lib/activitypub/videos.ts | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/server/lib/activitypub/videos.ts b/server/lib/activitypub/videos.ts index 710929aac..9ca0502a4 100644 --- a/server/lib/activitypub/videos.ts +++ b/server/lib/activitypub/videos.ts | |||
@@ -249,6 +249,7 @@ async function updateVideoFromAP (options: { | |||
249 | options.video.set('duration', videoData.duration) | 249 | options.video.set('duration', videoData.duration) |
250 | options.video.set('createdAt', videoData.createdAt) | 250 | options.video.set('createdAt', videoData.createdAt) |
251 | options.video.set('publishedAt', videoData.publishedAt) | 251 | options.video.set('publishedAt', videoData.publishedAt) |
252 | options.video.set('originallyPublishedAt', videoData.originallyPublishedAt) | ||
252 | options.video.set('privacy', videoData.privacy) | 253 | options.video.set('privacy', videoData.privacy) |
253 | options.video.set('channelId', videoData.channelId) | 254 | options.video.set('channelId', videoData.channelId) |
254 | options.video.set('views', videoData.views) | 255 | options.video.set('views', videoData.views) |
@@ -511,6 +512,7 @@ async function videoActivityObjectToDBAttributes ( | |||
511 | duration: parseInt(duration, 10), | 512 | duration: parseInt(duration, 10), |
512 | createdAt: new Date(videoObject.published), | 513 | createdAt: new Date(videoObject.published), |
513 | publishedAt: new Date(videoObject.published), | 514 | publishedAt: new Date(videoObject.published), |
515 | originallyPublishedAt: videoObject.originallyPublishedAt ? new Date(videoObject.originallyPublishedAt) : null, | ||
514 | // FIXME: updatedAt does not seems to be considered by Sequelize | 516 | // FIXME: updatedAt does not seems to be considered by Sequelize |
515 | updatedAt: new Date(videoObject.updated), | 517 | updatedAt: new Date(videoObject.updated), |
516 | views: videoObject.views, | 518 | views: videoObject.views, |