aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/video/video.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/models/video/video.ts')
-rw-r--r--server/models/video/video.ts27
1 files changed, 22 insertions, 5 deletions
diff --git a/server/models/video/video.ts b/server/models/video/video.ts
index 9b411a92e..052fc0ae8 100644
--- a/server/models/video/video.ts
+++ b/server/models/video/video.ts
@@ -567,6 +567,14 @@ toActivityPubObject = function (this: VideoInstance) {
567 name: t.name 567 name: t.name
568 })) 568 }))
569 569
570 let language
571 if (this.language) {
572 language = {
573 identifier: this.language + '',
574 name: this.getLanguageLabel()
575 }
576 }
577
570 const url = [] 578 const url = []
571 for (const file of this.VideoFiles) { 579 for (const file of this.VideoFiles) {
572 url.push({ 580 url.push({
@@ -608,10 +616,7 @@ toActivityPubObject = function (this: VideoInstance) {
608 identifier: this.licence + '', 616 identifier: this.licence + '',
609 name: this.getLicenceLabel() 617 name: this.getLicenceLabel()
610 }, 618 },
611 language: { 619 language,
612 identifier: this.language + '',
613 name: this.getLanguageLabel()
614 },
615 views: this.views, 620 views: this.views,
616 nsfw: this.nsfw, 621 nsfw: this.nsfw,
617 published: this.createdAt.toISOString(), 622 published: this.createdAt.toISOString(),
@@ -816,7 +821,19 @@ listAllAndSharedByAccountForOutbox = function (accountId: number, start: number,
816 include: [ 821 include: [
817 { 822 {
818 model: Video['sequelize'].models.VideoShare, 823 model: Video['sequelize'].models.VideoShare,
819 required: false 824 required: false,
825 where: {
826 [Sequelize.Op.and]: [
827 {
828 id: {
829 [Sequelize.Op.not]: null
830 }
831 },
832 {
833 accountId
834 }
835 ]
836 }
820 }, 837 },
821 { 838 {
822 model: Video['sequelize'].models.VideoChannel, 839 model: Video['sequelize'].models.VideoChannel,