diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-11-16 11:08:25 +0100 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-11-27 19:40:52 +0100 |
commit | efc32059d980c51793e8e9ac0fb6a885a8026f94 (patch) | |
tree | c272e63fd57a9625b53dc26ceb1b46aee35d21d3 /server/models/video | |
parent | d846501818c2d29e66e6fd141789cb04fd55a437 (diff) | |
download | PeerTube-efc32059d980c51793e8e9ac0fb6a885a8026f94.tar.gz PeerTube-efc32059d980c51793e8e9ac0fb6a885a8026f94.tar.zst PeerTube-efc32059d980c51793e8e9ac0fb6a885a8026f94.zip |
Send server announce when users upload a video
Diffstat (limited to 'server/models/video')
-rw-r--r-- | server/models/video/video-channel.ts | 4 | ||||
-rw-r--r-- | server/models/video/video.ts | 6 |
2 files changed, 5 insertions, 5 deletions
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) { | |||
153 | uuid: this.uuid, | 153 | uuid: this.uuid, |
154 | content: this.description, | 154 | content: this.description, |
155 | name: this.name, | 155 | name: this.name, |
156 | published: this.createdAt, | 156 | published: this.createdAt.toISOString(), |
157 | updated: this.updatedAt | 157 | updated: this.updatedAt.toISOString() |
158 | } | 158 | } |
159 | 159 | ||
160 | return json | 160 | 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) { | |||
558 | for (const file of this.VideoFiles) { | 558 | for (const file of this.VideoFiles) { |
559 | url.push({ | 559 | url.push({ |
560 | type: 'Link', | 560 | type: 'Link', |
561 | mimeType: 'video/' + file.extname, | 561 | mimeType: 'video/' + file.extname.replace('.', ''), |
562 | url: getVideoFileUrl(this, file, baseUrlHttp), | 562 | url: getVideoFileUrl(this, file, baseUrlHttp), |
563 | width: file.resolution, | 563 | width: file.resolution, |
564 | size: file.size | 564 | size: file.size |
@@ -601,8 +601,8 @@ toActivityPubObject = function (this: VideoInstance) { | |||
601 | }, | 601 | }, |
602 | views: this.views, | 602 | views: this.views, |
603 | nsfw: this.nsfw, | 603 | nsfw: this.nsfw, |
604 | published: this.createdAt, | 604 | published: this.createdAt.toISOString(), |
605 | updated: this.updatedAt, | 605 | updated: this.updatedAt.toISOString(), |
606 | mediaType: 'text/markdown', | 606 | mediaType: 'text/markdown', |
607 | content: this.getTruncatedDescription(), | 607 | content: this.getTruncatedDescription(), |
608 | icon: { | 608 | icon: { |