aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/video
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-05-28 12:13:00 +0200
committerChocobozzz <me@florianbigard.com>2018-05-28 12:13:00 +0200
commite3d5ea4f82ffbb51eae3471f004bf382b07ea04c (patch)
tree1289fb5b9dee76591edf1bcc0d45bcc8716e0ae3 /server/models/video
parent9007daff8262bcb539eb5fa74919828f425b5f69 (diff)
downloadPeerTube-e3d5ea4f82ffbb51eae3471f004bf382b07ea04c.tar.gz
PeerTube-e3d5ea4f82ffbb51eae3471f004bf382b07ea04c.tar.zst
PeerTube-e3d5ea4f82ffbb51eae3471f004bf382b07ea04c.zip
Fix actor outbox
Diffstat (limited to 'server/models/video')
-rw-r--r--server/models/video/video.ts17
1 files changed, 15 insertions, 2 deletions
diff --git a/server/models/video/video.ts b/server/models/video/video.ts
index f4689fe12..1640cd57f 100644
--- a/server/models/video/video.ts
+++ b/server/models/video/video.ts
@@ -602,6 +602,19 @@ export class VideoModel extends Model<VideoModel> {
602 attributes: [ 'id', 'url' ], 602 attributes: [ 'id', 'url' ],
603 model: VideoShareModel.unscoped(), 603 model: VideoShareModel.unscoped(),
604 required: false, 604 required: false,
605 // We only want videos shared by this actor
606 where: {
607 [Sequelize.Op.and]: [
608 {
609 id: {
610 [Sequelize.Op.not]: null
611 }
612 },
613 {
614 actorId
615 }
616 ]
617 },
605 include: [ 618 include: [
606 { 619 {
607 attributes: [ 'id', 'url' ], 620 attributes: [ 'id', 'url' ],
@@ -619,14 +632,14 @@ export class VideoModel extends Model<VideoModel> {
619 required: true, 632 required: true,
620 include: [ 633 include: [
621 { 634 {
622 attributes: [ 'id', 'url' ], 635 attributes: [ 'id', 'url', 'followersUrl' ],
623 model: ActorModel.unscoped(), 636 model: ActorModel.unscoped(),
624 required: true 637 required: true
625 } 638 }
626 ] 639 ]
627 }, 640 },
628 { 641 {
629 attributes: [ 'id', 'url' ], 642 attributes: [ 'id', 'url', 'followersUrl' ],
630 model: ActorModel.unscoped(), 643 model: ActorModel.unscoped(),
631 required: true 644 required: true
632 } 645 }