From efc32059d980c51793e8e9ac0fb6a885a8026f94 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 16 Nov 2017 11:08:25 +0100 Subject: Send server announce when users upload a video --- server/models/video/video-channel.ts | 4 ++-- server/models/video/video.ts | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'server/models/video') diff --git a/server/models/video/video-channel.ts b/server/models/video/video-channel.ts index 3cb4a33b9..1f4604f1d 100644 --- a/server/models/video/video-channel.ts +++ b/server/models/video/video-channel.ts @@ -153,8 +153,8 @@ toActivityPubObject = function (this: VideoChannelInstance) { uuid: this.uuid, content: this.description, name: this.name, - published: this.createdAt, - updated: this.updatedAt + published: this.createdAt.toISOString(), + updated: this.updatedAt.toISOString() } return json diff --git a/server/models/video/video.ts b/server/models/video/video.ts index 480e54276..64ee7ae34 100644 --- a/server/models/video/video.ts +++ b/server/models/video/video.ts @@ -558,7 +558,7 @@ toActivityPubObject = function (this: VideoInstance) { for (const file of this.VideoFiles) { url.push({ type: 'Link', - mimeType: 'video/' + file.extname, + mimeType: 'video/' + file.extname.replace('.', ''), url: getVideoFileUrl(this, file, baseUrlHttp), width: file.resolution, size: file.size @@ -601,8 +601,8 @@ toActivityPubObject = function (this: VideoInstance) { }, views: this.views, nsfw: this.nsfw, - published: this.createdAt, - updated: this.updatedAt, + published: this.createdAt.toISOString(), + updated: this.updatedAt.toISOString(), mediaType: 'text/markdown', content: this.getTruncatedDescription(), icon: { -- cgit v1.2.3